According to http://cygwin.com/packages/git/ the latest available Cygwin package is 1.7.9-1.
I would like to update git to at least 1.8.0.
Can I do this?
According to http://cygwin.com/packages/git/ the latest available Cygwin package is 1.7.9-1.
I would like to update git to at least 1.8.0.
Can I do this?
cygwinports has many new versions of various tools
At the time i write this it has 1.8.3.4
New, simplified installation instructions:
- Use the latest Cygwin installers (at least version 2.829): setup-x86.exe for 32-bit, or setup-x86_64.exe for 64-bit. (Note that many packages have not yet been ported to x86_64.)
Launch setup-*.exe with the -K flag, e.g.:
cygstart -- /path/to/setup-x86.exe -K http://cygwinports.org/ports.gpg
On Choose Installation Type page, select "Install from Internet".
- On Choose Download Site(s) page, select a distro mirror, then enter ftp://ftp.cygwinports.org/pub/cygwinports in the User URL field and press Add (making sure that both are highlighted).
- Alternatively, you can use a sourceware mirror, but if you do, you must use one hosted on a different server than your selected distro mirror.
- Proceed with package selection and installation, making sure to install any indicated dependencies.
To install git 1.8.0
you need to compile the source code.
You need to clone the git repository (git clone https://github.com/git/git.git
), enter the git directory, change the current version to 1.8.0 or other version that you want (git checkout v.1.8.0
) and type the following commands:
make configure
./configure --prefix=/usr/local
make
make install
It will install git under /usr/local
directory. For more information about git installation, like documentation, you can take a look in INSTALL
file localized in git repository root.
make configure
to create the ./configure
file.
May 10, 2013 at 21:59
I successfully installed git 1.8.4.474 by following these instructions; I'm running Windows 7 64 bits, cygwin version 1.7.22(0.268/5/3)
Run the Cygwin setup utility and ensure you have the following packages installed:
gcc autoconf curl 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) make libiconv python perl gettext
You may need libiconv-devel and cygwin32-liviconv (see Marek's comment)
Clone the Git sources with git clone https://github.com/git/git.git. A couple of notes on that with respect to Git configuration:
Make sure
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.sslcainfo
property value; either unset it or point it to/usr/ssl/certs/ca-bundle.crt
.From your newly cloned git repo, run the following commands:
make configure ./configure make make install
You're instructions didn't really work for me...
I followed these instructions (as far as making sure all the correct packages are installed)
http://randomartifacts.blogspot.com/2013/04/compiling-git-on-cygwin.html
Modified the Makefile
$ git diff Makefile
diff --git a/Makefile b/Makefile
index 3588ca1..90f337c 100644
--- a/Makefile
+++ b/Makefile
@@ -407,7 +407,7 @@ RPMBUILD = rpmbuild
TCL_PATH = tclsh
TCLTK_PATH = wish
XGETTEXT = xgettext
-MSGFMT = msgfmt
+MSGFMT = msgfmt.py
PTHREAD_LIBS = -lpthread
PTHREAD_CFLAGS =
GCOV = gcov
then
make configure NO_MSGFMT_EXTENDED_OPTIONS=1
./configure
make NO_MSGFMT_EXTENDED_OPTIONS=1
make install NO_MSGFMT_EXTENDED_OPTIONS=1
Not sure if the param is needed for all the make commands, but this worked for me
I got problem when doing "make install". The error message is:
install -d -m 755 '/usr/local/bin'
git: 'installation' is not a git command. See 'git --help'.
./install: line 4: Normally: command not found
./install: line 5: will: command not found
./install: line 6: to: command not found
./install: line 8: $: command not found
./install: line 11: syntax error near unexpected token.'
(or prefix=/usr/local, of course). Just like any program suite'
./install: line 11:
This is due to the case insensitivity of Windows OS if you have "./" in your PATH. Cygwin use the INSTALL file in the git source tree instead of /usr/bin/install. We have to rename some "INSTALL" files in the source tree to other file name. This is mentioned by http://zengrong.net/post/1817.htm
I had a problem doing this that took me an hour to debug, so am posting an answer in case anyone else comes here looking.
Actually it is the same cause as Yorkwar's, but different errors.
Everything goes fine until make install
outputs:
$ make install
GEN perl/PM.stamp
SUBDIR gitweb
SUBDIR ../
make[2]: 'GIT-VERSION-FILE' is up to date.
GEN git-instaweb
BUILTIN all
SUBDIR git-gui
SUBDIR gitk-git
SUBDIR perl
SUBDIR templates
install -d -m 755 '/usr/local/bin'
make: execvp: install: Permission denied
Makefile:2342: recipe for target 'install' failed
make: *** [install] Error 127
After a lot of mucking with UAC, setuid, icacls, ownership etc. , I found via strace
that the actual problem is that when executing install
: since I have ./
in my PATH
, and Windows is case-insensitive, it tries to execute INSTALL
, which is a textfile that does not have the x
bit set. So the "Permission denied" refers to the fact that x
is not set on this file.
@Yorkwar fixed this by renaming all the INSTALL
files, however another option is to edit Makefile
and replace
INSTALL = install
with
INSTALL = /usr/bin/install
I'm using cygwin 32-bit in Windows 7 64-bit (installed it before cygwin64 came out and haven't bothered to upgrade). Successfully built and install git version 2.0.0.rc4.dirty
which was the result of git clone https://github.com/git/git.git
.
make install
command. Worked like a charm, and I didn't have to modify any of the files.
A pre built package is not available, so you would have to build it yourself.
Alternatively you could download a non Cygwin build and just add it to your PATH
.
You can install the latest version for the Windows platform from git-scm.com/download/win.
Add the following to your ~/.profile
:
export PATH=$PATH:`cygpath 'C:\Program Files (x86)\Git\bin'`
I use this git client from both SourceTree and cygwin
in combination with a Gerrit/SSH server and did not run into any problem yet.