Re: Running git on Windows command line

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jul 22, 2010 at 6:31 PM, John Dlugosz <JDlugosz@xxxxxxxxxxxxxxxx> wrote:
> In the "CRLF behavior" thread, I found that my command line was not seeing the global settings.  This gave different results than the git-gui and naturally is a serious problem.
>
> This note is to record my findings and will hopefully be valuable to others using Windows.
>
> In Windows, users may be using the built-in CMD.exe, the Powershell, some other unix-like shell besides the one that comes up under "git bash here", or others.
>
> I found that it worked correctly on a plain CMD shell with no personal preferences loaded or anything, even though the HOME environment variable does not exist.  It did not work right on my normal shell (happens to be TCC-le) which was set up about two years ago, until I added the HOME variable to my initialization script.
>
> The plain command line adds "C:\Program Files (x86)\Git\cmd" to the PATH, and the git command resolves to git.cmd in that directory.  The latest msysgit installer set up that path globally.  Perhaps an earlier version arranged things differently?  Anyway, the TCC command line had an alias set up so git resolved to "C:\Program Files (x86)\Git\bin\git.exe", without searching.  If the situation changed with updates, it did not affect my set up there.
>
> One of the things the git.cmd batch file does is set the HOME variable.  It also sets the code page and sets the PATH to include a couple things along the git tree.  Two years ago, I found that no such PATH was necessary once git.exe itself was launched; it apparently knows where everything else is.  One of the things it adds to PATH, %git_install_root%\mingw\bin, does not even exist!  So this script may be dated.
>
> I'd be interested in finding out what the real story here is, if anyone knows more about it.

The msysGit (the development environment for Git for Windows)
installer does not modify the system-wide path, but the Git for
Windows installer does. Perhaps you've previously been using msysGit
instead of Git for Windows?

-- 
Erik "kusma" Faye-Lund
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]