* Running git on Windows command line
@ 2010-07-22 16:31 John Dlugosz
2010-07-22 18:38 ` Erik Faye-Lund
0 siblings, 1 reply; 8+ messages in thread
From: John Dlugosz @ 2010-07-22 16:31 UTC (permalink / raw)
To: git@vger.kernel.org
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.
--John
(sorry about the footer; it is not my idea nor my choice)
TradeStation Group, Inc. is a publicly-traded holding company (NASDAQ GS: TRAD) of three operating subsidiaries, TradeStation Securities, Inc. (Member NYSE, FINRA, SIPC and NFA), TradeStation Technologies, Inc., a trading software and subscription company, and TradeStation Europe Limited, a United Kingdom, FSA-authorized introducing brokerage firm. None of these companies provides trading or investment advice, recommendations or endorsements of any kind. The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited.
If you received this in error, please contact the sender and delete the material from any computer.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Running git on Windows command line
2010-07-22 16:31 Running git on Windows command line John Dlugosz
@ 2010-07-22 18:38 ` Erik Faye-Lund
2010-07-22 20:02 ` John Dlugosz
0 siblings, 1 reply; 8+ messages in thread
From: Erik Faye-Lund @ 2010-07-22 18:38 UTC (permalink / raw)
To: John Dlugosz; +Cc: git@vger.kernel.org
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
^ permalink raw reply [flat|nested] 8+ messages in thread
* RE: Running git on Windows command line
2010-07-22 18:38 ` Erik Faye-Lund
@ 2010-07-22 20:02 ` John Dlugosz
2010-07-22 20:41 ` Erik Faye-Lund
0 siblings, 1 reply; 8+ messages in thread
From: John Dlugosz @ 2010-07-22 20:02 UTC (permalink / raw)
To: kusmabite@gmail.com; +Cc: git@vger.kernel.org
> 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
I've only installed "msysgit". The item in the path, which I assume was added by the option to "Git from command prompt", with the other two choices being "Git bash only" and "git and included unix tools from command prompt". I did notice that the exact wording, if not the choices meanings (I'm not sure), seemed to change some time within the last two years.
I'm pretty sure Tortoise doesn't set the path, since it asks me where git is to be found. I've also installed qgit.
But, I suppose that "Git from command prompt" has to work somehow. I don't see anything for that other than changing the global path to point to these batch file wrappers.
--John
TradeStation Group, Inc. is a publicly-traded holding company (NASDAQ GS: TRAD) of three operating subsidiaries, TradeStation Securities, Inc. (Member NYSE, FINRA, SIPC and NFA), TradeStation Technologies, Inc., a trading software and subscription company, and TradeStation Europe Limited, a United Kingdom, FSA-authorized introducing brokerage firm. None of these companies provides trading or investment advice, recommendations or endorsements of any kind. The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited.
If you received this in error, please contact the sender and delete the material from any computer.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Running git on Windows command line
2010-07-22 20:02 ` John Dlugosz
@ 2010-07-22 20:41 ` Erik Faye-Lund
2010-07-22 20:55 ` John Dlugosz
0 siblings, 1 reply; 8+ messages in thread
From: Erik Faye-Lund @ 2010-07-22 20:41 UTC (permalink / raw)
To: John Dlugosz; +Cc: git@vger.kernel.org
On Thu, Jul 22, 2010 at 10:02 PM, John Dlugosz
<JDlugosz@tradestation.com> wrote:
>
>> 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
>
> I've only installed "msysgit". The item in the path, which I assume was added by the option to "Git from command prompt", with the other two choices being "Git bash only" and "git and included unix tools from command prompt". I did notice that the exact wording, if not the choices meanings (I'm not sure), seemed to change some time within the last two years.
>
It sounds to me like you've installed indeed Git for Windows (which is
the end-user product from the msysGit-project); the msysGit installers
doesn't show a wizard with questions, it just installs a
self-contained development environment.
You can tell the packages apart by the name:
* Git-something.exe and PortableGit-something.exe are installers for
Git for Windows.
* msysGit-netinstall-something.exe and
msysGit-fullinstall-something.exe are installers for msysGit, the
development environment used to develop Git for Windows.
I hope this clears up a bit.
--
Erik "kusma" Faye-Lund
^ permalink raw reply [flat|nested] 8+ messages in thread
* RE: Running git on Windows command line
2010-07-22 20:41 ` Erik Faye-Lund
@ 2010-07-22 20:55 ` John Dlugosz
2010-07-22 21:04 ` Erik Faye-Lund
0 siblings, 1 reply; 8+ messages in thread
From: John Dlugosz @ 2010-07-22 20:55 UTC (permalink / raw)
To: kusmabite@gmail.com; +Cc: git@vger.kernel.org
> It sounds to me like you've installed indeed Git for Windows (which is
> the end-user product from the msysGit-project); the msysGit installers
> doesn't show a wizard with questions, it just installs a
> self-contained development environment.
>
> You can tell the packages apart by the name:
> * Git-something.exe and PortableGit-something.exe are installers for
> Git for Windows.
> * msysGit-netinstall-something.exe and
> msysGit-fullinstall-something.exe are installers for msysGit, the
> development environment used to develop Git for Windows.
>
> I hope this clears up a bit.
>
> --
> Erik "kusma" Faye-Lund
OK, "Git-1.7.0.2-preview20100309.exe" installed something that identifies itself as "git version 1.7.0.2.msysgit.0"
The web page is identified as "msysgit" with "git for windows" in small type under it, which I take to be a descriptive statement, not a product name also. The downloads call them "Full installer for official Git" (what I used) and "...if you want to hack on Git".
The usage on this mailing list has always been "msysgit" as this windows variant git, as opposed to the Cygwin build. Mentioning that is necessary for accurate help. I mentioned msysgit as the keyword necessary when asking for help, not to mean I installed the development source.
--John
(ridiculous and unnecessary footer follows)
TradeStation Group, Inc. is a publicly-traded holding company (NASDAQ GS: TRAD) of three operating subsidiaries, TradeStation Securities, Inc. (Member NYSE, FINRA, SIPC and NFA), TradeStation Technologies, Inc., a trading software and subscription company, and TradeStation Europe Limited, a United Kingdom, FSA-authorized introducing brokerage firm. None of these companies provides trading or investment advice, recommendations or endorsements of any kind. The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited.
If you received this in error, please contact the sender and delete the material from any computer.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Running git on Windows command line
2010-07-22 20:55 ` John Dlugosz
@ 2010-07-22 21:04 ` Erik Faye-Lund
2010-07-22 22:32 ` John Dlugosz
0 siblings, 1 reply; 8+ messages in thread
From: Erik Faye-Lund @ 2010-07-22 21:04 UTC (permalink / raw)
To: John Dlugosz; +Cc: git@vger.kernel.org
On Thu, Jul 22, 2010 at 10:55 PM, John Dlugosz
<JDlugosz@tradestation.com> wrote:
>> It sounds to me like you've installed indeed Git for Windows (which is
>> the end-user product from the msysGit-project); the msysGit installers
>> doesn't show a wizard with questions, it just installs a
>> self-contained development environment.
>>
>> You can tell the packages apart by the name:
>> * Git-something.exe and PortableGit-something.exe are installers for
>> Git for Windows.
>> * msysGit-netinstall-something.exe and
>> msysGit-fullinstall-something.exe are installers for msysGit, the
>> development environment used to develop Git for Windows.
>>
>> I hope this clears up a bit.
>>
>> --
>> Erik "kusma" Faye-Lund
>
> OK, "Git-1.7.0.2-preview20100309.exe" installed something that identifies itself as "git version 1.7.0.2.msysgit.0"
>
> The web page is identified as "msysgit" with "git for windows" in small type under it, which I take to be a descriptive statement, not a product name also. The downloads call them "Full installer for official Git" (what I used) and "...if you want to hack on Git".
>
> The usage on this mailing list has always been "msysgit" as this windows variant git, as opposed to the Cygwin build. Mentioning that is necessary for accurate help. I mentioned msysgit as the keyword necessary when asking for help, not to mean I installed the development source.
I'm aware of all this, but I don't think you're hearing me: the reason
why the behavior has changed for you is very likely to be you having
switched package. Yes, the naming is confusing.
--
Erik "kusma" Faye-Lund
^ permalink raw reply [flat|nested] 8+ messages in thread
* RE: Running git on Windows command line
2010-07-22 21:04 ` Erik Faye-Lund
@ 2010-07-22 22:32 ` John Dlugosz
2010-07-22 23:00 ` Erik Faye-Lund
0 siblings, 1 reply; 8+ messages in thread
From: John Dlugosz @ 2010-07-22 22:32 UTC (permalink / raw)
To: kusmabite@gmail.com; +Cc: git@vger.kernel.org
> I'm aware of all this, but I don't think you're hearing me: the reason
> why the behavior has changed for you is very likely to be you having
> switched package. Yes, the naming is confusing.
>
> --
> Erik "kusma" Faye-Lund
No, I've only/always installed Git-1.*preview*.exe. I still have the downloaded files.
TradeStation Group, Inc. is a publicly-traded holding company (NASDAQ GS: TRAD) of three operating subsidiaries, TradeStation Securities, Inc. (Member NYSE, FINRA, SIPC and NFA), TradeStation Technologies, Inc., a trading software and subscription company, and TradeStation Europe Limited, a United Kingdom, FSA-authorized introducing brokerage firm. None of these companies provides trading or investment advice, recommendations or endorsements of any kind. The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited.
If you received this in error, please contact the sender and delete the material from any computer.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Running git on Windows command line
2010-07-22 22:32 ` John Dlugosz
@ 2010-07-22 23:00 ` Erik Faye-Lund
0 siblings, 0 replies; 8+ messages in thread
From: Erik Faye-Lund @ 2010-07-22 23:00 UTC (permalink / raw)
To: John Dlugosz; +Cc: git@vger.kernel.org
On Fri, Jul 23, 2010 at 12:32 AM, John Dlugosz
<JDlugosz@tradestation.com> wrote:
>
>> I'm aware of all this, but I don't think you're hearing me: the reason
>> why the behavior has changed for you is very likely to be you having
>> switched package. Yes, the naming is confusing.
>>
>> --
>> Erik "kusma" Faye-Lund
>
> No, I've only/always installed Git-1.*preview*.exe. I still have the downloaded files.
>
OK. In that case, I think you're in better luck if you send an e-mail
to to msysgit mailing list.
--
Erik "kusma" Faye-Lund
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2010-07-22 23:00 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-22 16:31 Running git on Windows command line John Dlugosz
2010-07-22 18:38 ` Erik Faye-Lund
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
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).