Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Git aliases
[alias]
co = checkout
st = status
ls = log --stat
cp = cherry-pick
lsshort = log --stat --abbrev-commit
lsnm = log --stat --no-merges
lslast = "!f() { \
git ls-tree --name-only HEAD $1 | while read filename; do echo \"$(git log -1 --date=iso --pretty=format:'%ad' -- $filename) $filename\"; done \
}; f"
dremote = push origin --delete
filesonly = show --pretty="" --name-only
recentbranches = branch --sort=-committerdate
alias = ! git config --get-regexp ^alias\\. | sed -e s/^alias\\.// -e s/\\ /\\ =\\ /
logp = log --graph --decorate --name-status --all
short = log --abbrev-commit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment