Now, on to the main topic of this post. I'm currently doing as much as possible from the Cygwin environment, and so naturally I have installed the Git package and use that instead of the more common (and perfectly usable, BTW) msysGit project. Unfortunately the currently shipping Cygwin version of Git is 1.7.9. That's a few releases old, and it bit me a little when I was Googling to figure out how to set the upstream URL for an existing remote. (The syntax for that command has changed a few times.)
So I thought I'd have a go at compiling the latest sources for Git. It turned out to be quite easy, but if you follow the "recipe" here it might save you a bit of Googling:
- Run the Cygwin setup utility and ensure you have the following packages installed:
- libcurl-devel, required for http/https support (NOTE: this is an obsolete package, you will need to uncheck "Hide obsolete packages" when selecting packages to install)
- you may need libiconv-devel and cygwin32-liviconv (see Marek's comment)
git clone https://github.com/git/git.gitusing some other version of Git. A couple of notes on that with respect to Git configuration if you do this:
- Before you clone, make sure your Git config has
core.autocrlf=false, otherwise you'll end up with DOS style line endings that cause the build to break.
- I also had a screwy
http.sslcainfoproperty value; either unset it or point it to
make configure ./configure make make installYou should be able to run
git --versionand see something more recent than 1.7.9. (I had to open a new Cygwin console before this exact command worked, but I could run
That's all there is to it (see, I told you it was easy). You're now running the latest version of Git. Thanks to all the folks who work on both Cygwin and Git for making this so easy.