Needed to push a file created on a notebook the other night to a Git repo on a desktop, both running Windows and connected to my home router. Thought the git protocol would work. It did not due to a bug in msysgit
. (TL/DR: the bug has been open since March 2010, but nobody so far has volunteered to find the root cause and remedy, or sponsor such an effort. The only sensible workaround is to recompile msysgit from source with the
protocol capability disabled, as the older
does not exhibit the problem, but the newer, faster alternative always takes precedence if both
client and server support it.)
Followed the advice from Eli Billauer’s blog
on my desktop, which plays the role of a “central” Git server.
Here is a patch script that worked for me. It requires Gsar for Windows
from the GnuWin32 collection; CygWin likely includes
@echo off copy /-y git.exe git.exe~ if errorlevel 1 goto copyfailed gsar -o -sside-band-64k -rKW6YzEZbBv584 git.exe if errorlevel 1 goto patchfailed echo git.exe successfully patched goto quit :copyfailed echo Could not create a backup copy of git.exe goto quit :copyfailed echo Could not patch git.exe with GSAR goto quit :quit
The value of the
option is just a random 13-character string generated by DuckDuckGo using the query
. You may wish to use different values on each Windows machine you may be pushing to using the git protocol.
This entry was posted on Tuesday, December 11th, 2012 at 10:44 pm and is filed underNotes for myself,Small Hacks. You can follow any responses to this entry through theRSS 2.0feed. You can skip to the end and leave a response. Pinging is currently not allowed.