Building Git 2.0.0 from sources on Windows
Interested in binaries? Git 2.0.0 build can be fetched from my Github repo https://github.com/madhur/msysgit-2.0.0 Note that I have not tested it thoroughly myself. If you face any issues, do bring it to my notice but I am in no way responsible for it. Use it at your own risk.
Git 2.0.0 just released few days back.
As of this writing, MsysGit for Windows has latest version 1.9.2 available for download.
Eager to try out this new version, I decided to build it myself.
- Download MysysGit build environment for Windows from here - https://github.com/msysgit/msysgit
Place it in a directory such as
- Download Git 2.0.0 sources from here - https://github.com/msysgit/git
Copy this entire source into the
git directory in
Note: Actually, the git repository in the first step has a submodule pointing to the second repository in
C:\gitbuild\git. If you are familiar with Git > submodules, you can download via submodule command as well.
C:\gitbuild\. You should be now in bash console as follows:
Note: In some envrionments, the build process should automatically begin after executing msys.bat. If it doesn’t go to the next step.
makecommand. The build process should now begin:
Once the build is complete, you may exit the bash shell.
- The build process automatically places the git binaries in
C:\gitbuild\bin. To confirm you have successfully built,
Congratulations you have just built Git 2.0.0 from sources. However, there are some quirks and tweaks required to be corrected, which we cover in next steps.
git guicommand throws an error as follows:
The reason of error is because
git gui depends on
Tcl/Tl 8.5.13 package. I just copied the following files and folders from my old build and it works fine.
After copying these files,
git gui should work fine.
- At this point, you have working version of Git 2.0.0 and you can remove the sources if you want.
If you get the error
fatal: unable to access '.....git/': SSL certificate problem: unable to get local issuer certificate, you may have to put this line in your .gitconfig. Replace
dwith your drive letter.
- You can also place your ssh private and public key in the
C:\gitbuildin order to work with Github