Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Git is automatically opening a Terminal window when I save commit messages on my Mac. This might normally be useful (e.g. if the commit was initiated from a Terminal window), but I use iTerm as my terminal emulator and as such this is just annoying. Is there anyway to configure Git to either use iTerm or otherwise stop doing this altogether?

share|improve this question
Nothing like this has ever happened to me. Mind showing us your git config -l? – Wuffers Jul 2 '11 at 23:02
Also show us your environment (env) so we can see what the editor-related variables are. Also, are you using some Git GUI interface, or the command line git? – Kevin Reid Jul 2 '11 at 23:40
up vote 2 down vote accepted

A-ha! So running env and re-examining my environment variables, I came across this little gem:

EDITOR=mvim -f -c "au VimLeave * !open -a Terminal"

I had apparently set my editor (MacVim in this case) to automatically reopen my terminal window when I was done, long before I was using Changing this to a simple

EDITOR=mvim -f -c "au VimLeave * !open -a iTerm"

alleviated my problem. Thanks for your answers and for providing me with the spark I needed to solve the problem!

share|improve this answer

I wonder if you system is trying to open a terminal window so you can enter the commit message? If so, you can make your commits without an editor like this:

git commit -m"My commit message here"

If you just type:

git commit

Then git opens an editor window so that you can provide the commit message. Hope this helps.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .