2

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?

2
  • 1
    Nothing like this has ever happened to me. Mind showing us your git config -l?
    – Wuffers
    Commented Jul 2, 2011 at 23:02
  • 1
    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
    Commented Jul 2, 2011 at 23:40

2 Answers 2

2

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 iTerm.app. 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!

0

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.

You must log in to answer this question.

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