Skip to content

Instantly share code, notes, and snippets.

View ilyamt-tandemg's full-sized avatar
🇺🇦
#slavaukraini

Ilya Mark Tavger ilyamt-tandemg

🇺🇦
#slavaukraini
  • Ukraine
View GitHub Profile
git_current_branch () {
local ref
ref=$(command git symbolic-ref --quiet HEAD 2> /dev/null)
local ret=$?
if [[ $ret != 0 ]]
then
[[ $ret == 128 ]] && return
ref=$(command git rev-parse --short HEAD 2> /dev/null) || return
fi
echo ${ref#refs/heads/}
@ilyamt-tandemg
ilyamt-tandemg / download and build git
Created September 5, 2022 16:25 — forked from avivey/download and build git
install git from source (For Ubuntu)
cd /tmp
wget -O git.zip https://github.com/git/git/archive/master.zip
unzip git.zip
cd git-*
sudo apt-get install make autoconf libcurl4-gnutls-dev gettext gcc zlib1g-dev
make configure
./configure --prefix=/usr --without-tcltk
make all
@ilyamt-tandemg
ilyamt-tandemg / download and build git
Created September 5, 2022 16:25 — forked from avivey/download and build git
install git from source (For Ubuntu)
cd /tmp
wget -O git.zip https://github.com/git/git/archive/master.zip
unzip git.zip
cd git-*
sudo apt-get install make autoconf libcurl4-gnutls-dev gettext gcc zlib1g-dev
make configure
./configure --prefix=/usr --without-tcltk
make all