I want to use difftool as the tool for dealing with git diff's. Specifically, I am used to using Vimdiff on an Linux environment. It doesn't seem that any tools come with git on Windows. I am running a Git Bash and I got the following message:
:~/rush$ git difftool
This message is displayed because 'diff.tool' is not configured.
See 'git difftool --tool-help' or 'git help config' for more details.
'git difftool' will now attempt to use one of the following tools:
kompare emerge vimdiff
What difftools can I use on Windows?
As suggested by #Mah, I did set this up with BeyondCompare and it works! See how to do it here:
http://www.scootersoftware.com/support.php?zz=kb_vcs
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
When I type git add --patch on my Windows 10 machine in the terminal, I get the error:
git: 'add--interactive' is not a git command. See 'git --help'.
I've googled to no avail, all other problems seem to be people running into this issue using other software or on Linux. Any tips?
This thread (for Git on Linux) mentioned the lack of a git-perl package.
But that should not be the case on Windows.
For testing, download PortableGit-2.17.0-64-bit.7z.exe and uncompress its content anywhere you want.
Then setup a simplified PATH:
set G=c:\path\to\latest\git
set PATH=%G%\bin;%G%\usr\bin;%G%\mingw64\bin
set PATH=%PATH%;C:\windows\system32;C:\windows\System32\Wbem;C:\windows\System32\WindowsPowerShell\v1.0\
In that CMD session, try again your git add -p command.
I am using git for source control in visual studio 2010. I can use commands like "git status" , "git commit" but when i try to use "git review" i am getting the error as " git: 'review' is not a git command. See 'git --help'."
Help me please
Edit1: i am using "git review" to submit git branches (code) to gerrit for review.
Git review is an external command from git. It is not a command included in git code. You have to install it.
Please follow Git-review documentation to the installation if you intend to use it.
It means that review is not a valid command to be used with git.
For e.g. when you use git add . - git understands that you want to stage all the files that you have changed to be committed. add . is a valid commandment for git to do staging operation.
In similar fashion, review is not a valid command and thus git recommends you to lookout for help by running git --help
What do you intend to do with review command?
EDIT 1: As per comments, adding screenshot of area from where pull
requests are created on github.com
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.
This error probaby has something to do with my path/environment variables but I don't know enough about those to fix this issue, any help is appreciated.
git pull
git: 'pull' is not a git command. See 'git --help'.
Did you mean one of these?
apple
shell
git --exec-path
/opt/local/libexec/git-core
which git
/usr/bin/git
echo $PATH
/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/MacGPG2/bin`