Git aliases are a cool feature. With a little config you can power up your Git command line.
Here a few I have configured that make my day-to-day use of Git much nicer.
This alias saves me typing a few characters (I’m lazy):
I can then save my fingers some effort by writing git st
to quickly check the status of repo.
I have the following alias configured that I use in place of the standard git log
command:
Running git lg
produces the following output which is much nicer than the default:
When developing changes on a local branch, prior to pushing to the remote repo I will generally rebase against master
. To achieve this I also need to pull master first. As I do this regularly I’ve wrapped it in the following alias:
This allows me to simply run git prom
to get my branch bang up-to-date.
I’d be interested to hear of any others people are using.