Question

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?

Was it helpful?

Solution

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.

OTHER TIPS

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"
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top