Skip to content

Instantly share code, notes, and snippets.

@rothwerx
Created December 7, 2020 23:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rothwerx/f04db7daddc8d831bc49f37ad82dc90c to your computer and use it in GitHub Desktop.
Save rothwerx/f04db7daddc8d831bc49f37ad82dc90c to your computer and use it in GitHub Desktop.
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