문제

I am working on learning how to use git and the section I am on now is using --amend. When I run this in terminal it opens up TextMate for me to change the message. I change the message and then save. I go back to terminal and nothing has happened.

What step am I missing here or am I not doing this correct?

도움이 되었습니까?

해결책

The text editor which you use should not "spawn off" and return control to git until you save and quit it. I don't know how to configure textmate to work in this fashion but if you set your EDITOR variable to something like vim, you should be able to see it work fine. When you run your command, it will spawn the editor and ask you to make changes. When you do so and quit, the git command will continue running and amend your commit.

다른 팁

You have to set the --wait (-w) flag in your git configuration. Thus you can type text in your editor and git will wait for the save/close event. For TextMate something like this should work:

git config --global core.editor "mate -w"
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top