From: Erik Faye-Lund <kusmabite@googlemail.com>
To: John Dlugosz <JDlugosz@tradestation.com>
Cc: "git@vger.kernel.org" <git@vger.kernel.org>
Subject: Re: Running git on Windows command line
Date: Thu, 22 Jul 2010 20:38:41 +0200 [thread overview]
Message-ID: <AANLkTimXZtlRKlAVuFH5TzzQ1z19ddYazIRKIgGALMpZ@mail.gmail.com> (raw)
In-Reply-To: <1A9EA7E081C3FE46A0F446FFB66D10EB939B8A@FL01EXMB01.trad.tradestation.com>
On Thu, Jul 22, 2010 at 6:31 PM, John Dlugosz <JDlugosz@tradestation.com> 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
next prev parent reply other threads:[~2010-07-22 18:49 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-22 16:31 Running git on Windows command line John Dlugosz
2010-07-22 18:38 ` Erik Faye-Lund [this message]
2010-07-22 20:02 ` John Dlugosz
2010-07-22 20:41 ` Erik Faye-Lund
2010-07-22 20:55 ` John Dlugosz
2010-07-22 21:04 ` Erik Faye-Lund
2010-07-22 22:32 ` John Dlugosz
2010-07-22 23:00 ` Erik Faye-Lund
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=AANLkTimXZtlRKlAVuFH5TzzQ1z19ddYazIRKIgGALMpZ@mail.gmail.com \
--to=kusmabite@googlemail.com \
--cc=JDlugosz@tradestation.com \
--cc=git@vger.kernel.org \
--cc=kusmabite@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).