Git for windows

I am a new Git user for Windows. I installed from Google Code (1.8.1.2 and 1.7 as a trial version).

I can issue several Git commands and they are great and work great. However, the git diff and git log commands do not work. These commands are returned using

'': : command not found 

I tried uninstalling and reinstalling. I also have GitHub for Windows on my machine. The machine is a Windows 7, a very new assembly.

Can someone help or give me diagnostic pointers as to why these two teams fail?

+6
source share
3 answers

In .gitconfig, the pager value was empty. Any git command that sends messages to a pager (i.e. git-diff or git -log) with the -not-found command, since DOS is asked to run an empty line as a command. I don’t know how it happened.

+2
source

It looks like your .gitconfig file cannot be configured correctly or there is no environmental PATH.

For people new to git, I almost always recommend starting with

Git Hub for Windows (easiest for new users)

or

Git Extensions (not sure if this is what you installed)

+3
source

The path is too long to insert

Make sure your PATH is not too big or it may be truncated, with strange side effects (for example, potentially your error messages)

Try running the git-cmd.bat or git-bash shortcut , both included in the msysgit mailing list .
They will complement PATH and install HOME (which is very important since Windows does not install HOME by default)

In these sessions ( git-cmd or bash ), git diff should work.

The actual solution was like " msysGit: why does git print empty lines?: Install a pager

 [core] pager = less -R 
+2
source

All Articles