Skip to content

Instantly share code, notes, and snippets.

@mrwacky42
Created January 3, 2024 23:45
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 mrwacky42/d0382592638e9541a571c5a5ba23af0b to your computer and use it in GitHub Desktop.
Save mrwacky42/d0382592638e9541a571c5a5ba23af0b to your computer and use it in GitHub Desktop.
lol = log --graph --decorate --oneline
lola = log --graph --decorate --oneline --all
prune-branches = !git remote prune origin && git branch -vv | grep ': gone]' | awk '{print $1}' | gxargs -r git branch -D
list-prunable = !git remote prune origin >&/dev/null && git branch -vv | grep ': gone]' | awk '{print $1}'
commits-on-this-branch-compared-to-master = !git cherry -v master
# Essentially - show me what I changed on this branch vs master
diffmaster = !git diff master...
dm = !git diff master...
mm = !git fetch origin master && git merge origin/master --log --no-edit
rbom = !git fetch origin master && git rebase origin/master
g = !git grep -i
# create new branch starting at master
comb = "!f() { git checkout -b \"$1\" master; }; f"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment