When I try to commit something, not using "-m", I get this message immedately.
I changed my default editor to atom with "-w" set, also tried "-W".
git config --global core.editor -w
Using vim, it works just fine...
I'm running OSX Yosemite.
So, how can I get this to work?
Edit: Atom opens properly, but the error message gets posted before it does.
The Atom Editor Git Integration page, in the "Commit Editor" section states that you must pass the --wait flag as part of the editor command:
git config --global core.editor "atom --wait"
Related
I have installed git and all the commands work properly except git log. When I type git log, this message appears:
command not found
what could be the possible reason for such a strange behaviour?
$ git --version
git version 2.16.1.windows.4
$ which git
/mingx64/bin/git
I just found the solution and wanted to share it with those who may come across the same error. It seems git log uses PAGER to show the messages and what I did was to use the git config --global core.pager '' command to stop git from using PAGER.
I've encountered this issue (or something similar to it).
Check inside your git config file, which you can find by running git config --list --show-origin
Check to see if you have any properties appended to that file that look incorrect.
For my issue, I had:
[core]
fsmonitor ==
Which was incorrectly setting a git property to an inappropriate value, causing the output to be: =: =: command not found
Does anyone know how to fix this error? Everything worked fine a few days ago in this same repository. Now that I'm trying to commit new changes, I get this error that I cannot fix. As far as I know, nothing has changed except for some Windows updates from patch Tuesday.
$ git commit
hint: Waiting for your editor to close the file... C:/Program Files/Git/usr/bin/vim.exe: C:/Program: No such file or directory
error: There was a problem with the editor 'C:/Program Files/Git/usr/bin/vim.exe'.
Please supply the message using either -m or -F option.
$ git config --global core.editor
C:/Program Files/Git/usr/bin/vim.exe
I've upgraded git for windows to the latest, but that didn't help. The error doesn't make any sense; vim runs fine. It says that git is waiting for vim to close "C:/Program", but that sounds like git passed vim a full path but forgot to escape the space. How could that happen?
You need to fix quotes in your .gitconfig:
git config --global core.editor "'C:/Program Files/Git/usr/bin/vim.exe'"
I use Windows 10 and a while back I changed the default Git editor to Notepad++
Now whenever I execute a command that brings up the editor I can't find any way of saving the message & continuing with the command - I end up having to cancel i.e. CTRL + C
I don't have to have Notepad++ as the editor but I do need to be able to use Git properly.
What I've tried
Restoring the original editor (I wasn't able to find out how)
Finding a similar problem on Stack Overflow
Restoring the original editor (I wasn't able to find out how)
You can try:
cd /path/to/your/repo
git config --unset-all core.editor
git config -l|grep core.editor
(grep is available if you add your <git>/usr/bin to the Windows %PATH%.
<git> is the path where you have installed git)
If that does not work, you might have to remove it for your local and global config:
cd /path/to/your/repo
git config --local --unset-all core.editor
git config --global --unset-all core.editor
git config -l|grep core.editor
I've tried setting up p4merge as my mergetool, but I can't seem to get it working. Here's my commands:
git config --global merge.tool p4merge
git config --global mergetool.p4merge.path "C:/Program Files/Perforce/p4merge.exe"
git config --global mergetool.p4merge.cmd "p4merge.exe \"$BASE\" \"$LOCAL\" \"$REMOTE\" \"$MERGED\""
And here's the error I'm getting:
I've also tried installing a portable version of git and running the commands from a windows cmd prompt and I still get a similar error.
Any ideas here? I'm stumped.
Edit
Strangely enough, after I've set up p4merge via git bash and it failed, I tried merging in Visual Studio's Team Explorer and it launched p4merge (tableflip). I imagine the command that kicks off via VS is similar to git bash, but I'm not sure how to correlate the two.
Edit 2:
Here's my git status showing my merge conflict status:
First, try those same config command form a regular cmd session (as I mentioned in "escape double quotes in git config from cmd").
Just make sure you have unzipped the latest git-for-windows
(PortableGit-2.8.3-64-bit.7z.exe) in, for instance, C:\git, and added C:\git\bin to your %PATH%.
Second make sure you have files that need merging, ie. that have unresolved merge conflicts (with merge conflict markers in them), in order for git mergetool to work.
I have set a new test project to see how to use git, so I have checked GIT when creating the project. Then I have pressed on the create button and got a weird warning (attached).
Then I have opened the project and all the files were marked with A (They shouldn't) as git
should commit them on the project creation.
Any idea how to configure a user for git?
I have also tried to open terminal and write the line from the error with my email. it didn't worked.
I use xcode 4.6.1
Executing the following two commands from the terminal should make sure you won't get this error in the future:
git config --global user.email "IOS.DEV#mail.com"
git config --global user.name "IOS DEV"