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