threads / discuss / 18169

Using Git with windows

Subject: Using Git with windows

## tl;dr

10 messages between Mar 6, 2009 and Mar 9, 2009.

replies: 9people: 8as markdown or json

Tariq Hassanen· Mar 6, 2009, 07:23 UTC · lore
Hi all,

I know there are some ports for it on windows such as msysGit and it can also be done on Cygwin. But is there a way around this if i run a linux VM with Git running and mount a windows ntfs partition ?

Im trying to keep the power of Git running on linux and the ability to use Git for .NET apps Any ideas? Or am i best sticking with SVN until the ports are mature enough? Tariq

John Chapman· Mar 6, 2009, 08:16 UTC · re: Tariq Hassanen · lore

Re: Using Git with windows

(Hmm, don't know why evolution didn't quote the message...)

Tariq, while git is heaps nicer and better on Linux, it works quite well on windows as well, and is reasonably mature.

Just be sure to be aware of autocrlf, and that on windows with msysgit,
it is enabled by default.
 - Also, if you use the cygwin version instead, be aware that applying
patches, etc, can get /funky/ when cygwin is using unix line endings,
but your development environment doesn't.  Again, be very aware of line
endings.

Unless you think your repository will become larger than 2GB (Not likely), then msysgit will do just fine.

Running git under linux in vmware will be faster, but not worth the bother, in my opinion.

Johannes Schindelin· Mar 6, 2009, 10:59 UTC · re: John Chapman · lore

Re: Using Git with windows

Hi,
On Fri, 6 Mar 2009, John Chapman wrote:
Show 7 quoted lines
> Just be sure to be aware of autocrlf, and that on windows with msysgit,
> it is enabled by default.
>
> [...]
> 
> Unless you think your repository will become larger than 2GB (Not 
> likely), then msysgit will do just fine.
Both issues will be addressed in the next Git for Windows installer.

Ciao, Dscho

Tim Visher· Mar 6, 2009, 14:38 UTC · re: Tariq Hassanen · lore

Re: Using Git with windows

On Fri, Mar 6, 2009 at 2:23 AM, Tariq Hassanen <tariq.hassanen@gmail.com> wrote:
> I know there are some ports for it on windows such as msysGit and it
> can also be done on Cygwin.

IMHO, Git under cygwin's pretty nice. I tried using MSysGit as well and didn't feel like it was quite as good as just building Git under cygwin. I also run Git on an Mac at home and while it's clearly faster, Git under Cygwin still beats the pants off of SVN under Cygwin.

> But is there a way around this if i run a linux VM with Git running
> and mount a windows ntfs partition ?

Would this really be faster? I don't have a whole lot of experience with virtualization, but isn't Cygwin 'basically' doing this already? I mean, it's attempting to emulate linux system calls so that linux software can be recompiled to run on o a Windows box.

> Any ideas? Or am i best sticking with SVN until the ports are mature enough?
> Tariq

I wouldn't bother waiting. Git is plenty mature on Windows, either via msys or via Cygwin. There's no real reason to delay. :)

-- 
In Christ,

Timmy V.

http://burningones.com/
http://five.sentenc.es/ - Spend less time on e-mail
Dmitry Potapov· Mar 6, 2009, 15:30 UTC · re: Tim Visher · lore

Re: Using Git with windows

On Fri, Mar 6, 2009 at 5:38 PM, Tim Visher <tim.visher@gmail.com> wrote:
Show 6 quoted lines
>
> IMHO, Git under cygwin's pretty nice.  I tried using MSysGit as well
> and didn't feel like it was quite as good as just building Git under
> cygwin.  I also run Git on an Mac at home and while it's clearly
> faster, Git under Cygwin still beats the pants off of SVN under
> Cygwin.

If I am not mistaken Git 1.6.1 should work about twice faster under Cygwin than previous versions with such common operations as "git diff", "git status", because it avoids emulation of stat() in most common cases...

Show 6 quoted lines
>
>> But is there a way around this if i run a linux VM with Git running
>> and mount a windows ntfs partition ?
>
> Would this really be faster?  I don't have a whole lot of experience
> with virtualization, but isn't Cygwin 'basically' doing this already?

No, Cygwin works very differently... In some cases, Cygwin will work faster, but there are operations that are very costly under Cygwin such as fork(). So, what is faster depends on what you do, and there are many other factors here such available memory or present some antivirus programs, which can kill performance... But, in general, if you work on Windows, it makes much more sense to Cygwin or MSysGit than running Git under VmWare...

Dmitry
Pascal Obry· Mar 7, 2009, 17:58 UTC · re: Tim Visher · lore

Re: Using Git with windows

Tim Visher a écrit :
> I wouldn't bother waiting.  Git is plenty mature on Windows, either
> via msys or via Cygwin.  There's no real reason to delay. :)

I second that. I'm using Cygwin's Git for almost 2 years now on more than 15 repositories. Some are plain Git, the most of them are git-svn. No issue, working perfectly under Cygwin.

Pascal.
-- 
--|------------------------------------------------------
--| Pascal Obry                           Team-Ada Member
--| 45, rue Gabriel Peri - 78114 Magny Les Hameaux FRANCE
--|------------------------------------------------------
--|    http://www.obry.net  -  http://v2p.fr.eu.org
--| "The best way to travel is by means of imagination"
--|
--| gpg --keyserver keys.gnupg.net --recv-key F949BD3B
Pascal Obry· Mar 7, 2009, 18:00 UTC · re: Tim Visher · lore

Re: Using Git with windows

oh yes one issue. I have never been able to make git instaweb working on Cygwin and never had time to look at this problem.

Pascal.
-- 
--|------------------------------------------------------
--| Pascal Obry                           Team-Ada Member
--| 45, rue Gabriel Peri - 78114 Magny Les Hameaux FRANCE
--|------------------------------------------------------
--|    http://www.obry.net  -  http://v2p.fr.eu.org
--| "The best way to travel is by means of imagination"
--|
--| gpg --keyserver keys.gnupg.net --recv-key F949BD3B
Robin Rosenberg· Mar 7, 2009, 19:02 UTC · re: Pascal Obry · lore

Re: Using Git with windows

lördag 07 mars 2009 19:00:24 skrev Pascal Obry <pascal@obry.net>:
Show 6 quoted lines
> 
> oh yes one issue. I have never been able to make git instaweb working on
> Cygwin and never had time to look at this problem.
> 
> Pascal.
> 

I think that worked fine when I tried using cygwin's apache. Mixing a cygwin git with a win32 apache did not work well.

-- robin
Pascal Obry· Mar 7, 2009, 19:04 UTC · re: Robin Rosenberg · lore

Re: Using Git with windows

Robin Rosenberg a écrit :
> I think that worked fine when I tried using cygwin's apache. Mixing a cygwin
> git with a win32 apache did not work well.

Well, I tried with lighttpd IIRC. I do not want Apache just for browsing a Git repo.

-- 
--|------------------------------------------------------
--| Pascal Obry                           Team-Ada Member
--| 45, rue Gabriel Peri - 78114 Magny Les Hameaux FRANCE
--|------------------------------------------------------
--|    http://www.obry.net  -  http://v2p.fr.eu.org
--| "The best way to travel is by means of imagination"
--|
--| gpg --keyserver keys.gnupg.net --recv-key F949BD3B
Ramsay Jones· Mar 9, 2009, 18:29 UTC · re: Pascal Obry · lore

Re: Using Git with windows

Pascal Obry wrote:
Show 7 quoted lines
> Robin Rosenberg a écrit :
>> I think that worked fine when I tried using cygwin's apache. Mixing a cygwin
>> git with a win32 apache did not work well.
> 
> Well, I tried with lighttpd IIRC. I do not want Apache just for browsing
> a Git repo.
> 

Pascal, I also installed lighttpd on cygwin, just so that I could test gitweb and cgit (I have Apache installed on Linux). I had a few problems getting it to work at first. Only later did I notice that "git-instaweb" didn't work. Having fixed the installation problems earlier, I fixed git-instaweb and then forgot to send in the patch. Oops... Patch on the way... ;-)

[I had intended to make several other changes and submit it later...]

You may also notice that "git-instaweb" does not provide the git-logo.png and git-favicon.png; so if that bothers you, just copy those files from your git repo into the target repo's .git/gitweb directory. (That was one of the things I was going to look at fixing)

<off-topic>
Note: if you decide to try cgit, then be aware that lighttpd has a bug which
causes problems with mixed-case pathnames in the pathinfo. lighttpd down-cases
the filename part of the pathinfo when on a case insensitive filesystem, so
cgit can't find the corresponding blob. (This is not a problem with gitweb).

I sent a fix for this bug to (who I thought was) the lighttpd maintainer, but didn't get any response; so don't count on a fix for this.

An amusing, but impractical, workaround for this is to name your document root something like /123 ie the path is numeric (and so does not differ in case ;-) [lighttpd uses a runtime test of the case-sensitive-ness of the document root pathname to control this behaviour]

Also, I could not get lighttpd to execute a cgi program with an ".exe" extension so I had to create a simple script, viz:

$ cat /var/www/cgit/cgit.cgi #!/bin/sh exec /var/www/cgit/cgit.cgi.exe $ <off-topic>

ATB, Ramsay Jones

← back to recent threads