Skip to content

Instantly share code, notes, and snippets.

@timlianov
Last active May 20, 2017 21:01
Show Gist options
  • Save timlianov/23f9a2860ab7735945ecd6abab7f58d4 to your computer and use it in GitHub Desktop.
Save timlianov/23f9a2860ab7735945ecd6abab7f58d4 to your computer and use it in GitHub Desktop.
# Shorthand Git CLI syntax + better git log
# Better git log
git config --global alias.lg "log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative"
function gs {
git status
}
function gd {
git diff
}
function gdc {
git diff --cached
}
function gc {
git commit -m $1
}
function ga {
git add $1
}
function gaa {
git add --all
}
function gpso {
git push origin $1
}
function gl {
git lg
}
function glog {
git log
}
function gb {
git branch
}
function gba {
git branch -a
}
function glr {
git ls-remote
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment