问题
for some reason whenever I pull from master, git will not auto commit the changes to my local branch. I get the following error:
/usr/bin/mate -w: /usr/bin/mate: No such file or directory
error: There was a problem with the editor '/usr/bin/mate -w'.
Not committing merge; use 'git commit' to complete the merge.
and I have to manually do the commit after pulling. This only started since I set up my new machine and never happened on my old one. Any help is appreciated.
回答1:
I can reproduce your problem if I set my core editor in some toy local repository like so
git config core.editor "/usr/bin/mate -w"
and then try to run a command that uses the editor:
$ git commit
/usr/bin/mate -w: /usr/bin/mate: No such file or directory
error: There was a problem with the editor '/usr/bin/mate -w'.
Please supply the message using either -m or -F option.
I'm getting this error because there is no file or directory called /usr/bin/mate
on my machine (I don't have TextMate installed).
You're getting a similar error for a similar reason: either TextMate is installed on your machine but not at /usr/bin/mate
, or it's not installed at all. You should either
- use a text editor that's already installed on your machine; or,
if you insist on using TextMate, make sure that it is actually installed; then run
git config core.editor "<path_to_mate> -w"
Alternatively, add
mate
to your path and simply rungit config core.editor "mate -w"
来源:https://stackoverflow.com/questions/26223074/git-doesnt-auto-commit-when-i-pull