Git Tip: My favorite Git aliases

Git aliases that make my life easier. I don't like needing to remember long terminal commands.

[alias] # save some key strokes co = checkout cp = cherry-pick # remove branches that are not present in remote klean = !git branch -vv | grep ': gone]' | awk '{print $1}' | xargs git branch -d # remove branches that are not present in remote even if they have not been merged into master kleanD = !git branch -vv | grep ': gone]' | awk '{print $1}' | xargs git branch -D # pull and push - if you're pap = !git pull --rebase && git push # fetch remote, prune, and pull in one command update = !git fetch --all --prune && git pull --rebase # update misspell udpate = !git fetch --all --prune && git pull --rebase