Skip to content

Instantly share code, notes, and snippets.

@patrikbeno
Created February 3, 2016 08:43
Show Gist options
  • Save patrikbeno/92ec81e12896931b3f69 to your computer and use it in GitHub Desktop.
Save patrikbeno/92ec81e12896931b3f69 to your computer and use it in GitHub Desktop.
Install/Upgrade Git in Babun/Cygwin
#!/bin/bash
pact remove git
pact install make autoconf python perl tcl curl gettext gcc-g++ libcurl-devel libexpat-devel libiconv gettext-devel libiconv-devel cygwin64-libiconv
version=2.7.0
curl -s https://www.kernel.org/pub/software/scm/git/git-${version}.tar.xz | tar xJv && cd git-${version} && (
make configure && ./configure --prefix=/usr
make -i && make -i install
)
curl -s https://www.kernel.org/pub/software/scm/git/git-manpages-${version}.tar.xz | tar xJv -C /usr/share/man --no-same-owner --no-overwrite-dir
@tomcharter365
Copy link

if you replace version=2.7.0 with version="$(curl -Lks https://mirrors.edge.kernel.org/pub/software/scm/git/ | grep -iv "manpages\|htmldocs\|core" | grep -i "tar.xz" | cut -d\" -f 2 | sort -nr | head -1 | sed 's|git-||g; s|.tar.xz||g')" then this will install the latest version of git

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment