Most of these aliases are self explanatory, but let’s go through some of the less common ones.

brm

Using the branch --merged command will give you a list of branches merged into the branch you’re currently on. It’s counterpart branch --no-merged does exactly the opposite. These commands are great for cleaning up merged branches.

copl

This is a function that takes a branch name for an argument. It first checks out that branch, and then runs a git pull --rebase on that branch. I found myself constantly checking out a branch and pulling it immediately, so I turned it into one alias.

lg

This is a prettier log format. It will actually create the branch structure in the terminal.

reaper

Sometimes you need your local git to forget about remote branches that no longer exist. This is where pruning comes into play. When I first wrote this alias, it was repr for “remote prune”. Phonetically, that sounded like “reaper” and given that I’m slashing branches from git, it seemed appropriate to rename the alias after our friendly harbinger of death.

So there you have it. Hope this Git aliases help you out. Leave some of your favorites in the comments below.

Liked what you read? Want a kick ass developer to work for you? Hire me for your next web project.