Ask HN: How is Git on Windows today?
I have heard that git on Windows has been shaky in the past, but I am wondering if things are better today?
I will need to setup git on a Windows server, and then I am wondering what the best way for developers to use it on their Windows boxes would be?
Note: while you may think command line is the best way to use git, the people around me would prefer a Visual Studio plugin or something along those lines.
Also: how common is it to install git on a Windows server? Is it probably just best to stick with something like SVN?
26 comments
[ 2.1 ms ] story [ 77.8 ms ] thread- Disagreements about case insensitive paths sometimes confuse git. Renaming a folder simply to change its case is the most common one that catches me.
- I run everything through the bash shell which works fine but is a pain to connect to Windows batch files. This makes automation harder than required.
- Line endings... I just turn off any automatic conversion and use a decent editor that doesn't mind.
I initially used the GUI that comes with it and that works fine but I find the command line faster to work with. The advantages of git make the above problems worth it to work around for me.
I don't run my own server so can't comment on that. From what I have read linux setup would be much easier to do.
I don't bother with VS integration, I prefer to checkin the folder to make sure I get all the extra files that aren't shown in VS
What are you using bash or batch files for? Have you tried PowerShell as a replacement for batch files?
I actually have a C# console app as my build script because I can write things there so much faster than anywhere else. It makes calls to Windows and the occasional batch / bash script.
`Get-Help` and `Get-Member` are great discovery tools -- pipe anything to it, or do `Get-Member -inputObject $foo` and get all its properties.
Using the windows CMD shell works fine.
Git comes with its own SSH that works different to other SSH implementations. I've had problems where Git is earlier in the path, so its SSH was overriding the one I wanted. This broke cwRsync until I worked it out.
I use TortoiseGit integrated into Windows Explorer for most stuff, and drop down to the command line in the odd situation where it's needed. I can't give much feedback about the server side, I'm using GitHub.
I've never used a gui for git, so I can't comment on how well they work.
The initial import took a ridiculous amount of time (so I did it on a mac eventually), but from that point on I've been flying. The only itchy bit so far is the autocrlf part.
I've found "gitk" and "git gui" good as well. You might find them more than merely adequate. I've used Tortoise with svn, but not with git, so dunno about that, but I'd recommend git gui without hesitation.
Avoid cygwin git; it appears to work at first, but it gets very slow when you deal with large repositories.
None of the end-to-end GUIs I've used (I've tried about 5) do a respectable job. They all try to layer a svn-style view on top of git. Which is, of course, nothing like svn. Have them watch http://blip.tv/file/4094854, then offer to hold their hand while they get used to the command line. It's worth it. When you really need to click on things, git gui and gitk do the job fine.
I've used git on windows very briefly in the past, using this feature, and it seemed pretty nice. I'm planning on having some window-based coworkers use git soon, and does this really become a big problem?
Manageable is the most I can say though. I've come to the conclusion that going through the trouble of msysgit/cygwin is not worth it. I don't know if it's an option for you but have you considered other DVCS? From what I heard Mercurial is pretty good on Windows and you'd get pretty much the same advantages as with Git. Others might be able to tell you more about it.
I wouldn't go back to SVN on any platform though - I got addicted to local branches and the speed of having the whole repo locally.
Git is, given its heritage, heavily optimized for unix-style (especially linux) vfs implementations, so it is slower on windows than it is on osx or linux, however even with a fairly sizeable repository it's completely usable. It's not noticeably slower than the alternatives on windows and it's generally much faster on unix.
Go for it.
For setting up a git server on windows please check out gerrit ( http://code.google.com/p/gerrit ). It is a pure Java implementation so should work reasonably well on Windows.