Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save lexeek/b2685e5179a678c4d2dbf8505a6f759d to your computer and use it in GitHub Desktop.
Save lexeek/b2685e5179a678c4d2dbf8505a6f759d 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