2013 Nov 29
[Git] Git 1.8 or higher in cygwin
Why update cygwin default git (v1.7.4)?
=> in the old version, git pull will linearize your history if you have a merge commit in it.
An alternative for that is:
git fetch
git rebase --preserve-merges
Do you want to have so much commands? Neh
=> in the 1.8.5, you only need to do that one time and then normally use git pull:
git config pull.rebase preserve # Do it one time
How To?
git clone https://github.com/git/git.git
cd git
git checkout v.1.8.5 # Or any version you want
In Makefile, replace the following line:
MSGFMT = msgfmt
by
MSGFMT = msgfmt.py
make configure NO_MSGFMT_EXTENDED_OPTIONS=1
./configure
make NO_MSGFMT_EXTENDED_OPTIONS=1
make install NO_MSGFMT_EXTENDED_OPTIONS=1
Troubleshooting:
- You will need the following packages from cygwin installer:
- iconv-devel
- make
- dos2unix (optional)
- autoconf
- zlib-devel
- libcurl-devel (otherwise https protocol won’t work. It is widely used by host providers. e.g: GitHub, BitBucket, …)
- If it complains about some “\r”, change the endline of the concerned files with dos2unix