I use Git everyday, whether it be for IronRuby, AgDLR, or random other Rails/Ruby work. Being that I work at Microsoft, I got my hands on earlier build of Windows 7 during the fall. Unfortuantely, git didn’t work fully on Windows 7, failing whenever a merge happened, which made push fail, as well as pull when trying to get other people’s changes). Jim Deville has been tracking this with the Windows team, and even bringing it up to the msysgit maintainer to see if there’s any way around this. It was looking grim, so I left my main development machine on Vista, and was sad.
Windows 7 Beta was released this past Friday, and I managed to download the .iso, get a Product Key, etc, at home during the day on Saturday. Now that it’s released, I’m guessing other people will have this problem ...
I’m not sure of the specific details behind the issue, but msysgit calls into C:\windows\system32\msvcrt.dll during a merge, and the changes to that DLL in Windows 7 breaks msysgit. Last week, John Lam was describing the issue to John Messerly, and realized that the easiest fix would be to copy the Windows Vista msvcrt.dll to the C:\Program Files\Git\bin directory, since Windows DLL resolution will look on the PATH, and “.” is included.
Curt Hagenlocher just reminded me of the fix, and it works!
Pretty awesome. Enjoy Git in Windows 7!

8 comments:
Sorry, but it is really Windows' fault, breaking backwards compatibility in such a blatant way. After all, it is the C runtime, part of the C standard, that we are talking about.
Yes, it is Windows' fault, and they should fix it for the final release of Win7. I never said that it wasn't Windows' fault, so no need to be sorry.
But to fix it now, and get Git running on Windows 7, this is the work-around.
This is why such broad-ranging public betas are so important. Thanks for the temporary work-around; much obliged. :)
this will be really handy when i get home. i put windows 7 on my laptop and my girlfriend is always taking over my desktop.
@bearassbear
you have three choices:
get a new girlfriend
or purchase another laptop.
or both.
Out of curiosity, when will Microsoft build on SUA? When will anyone in the *nix communities abandon Cygwin/MinWin for SUA? If SUA can't cut it, why not make it better? If it's a home-version Windows issue (SUA isn't available on thsoe), why not make it available on Home editions? Should we forever keep throwing SUA out for MinWin/Cygwin?
The fix does not seem to work with the latest versions of Git, 1.6.1 works but 1.6.2.1 doesn't.
Thank you very much for info on how to work around it! I had to use version 1.6.1 of Git though. (So the post above seems to be correct)
Post a Comment