Common Git Alias
·1 min
Over the years I have been collecting the aliases that makes sense for me, and by that I really mean makes sense for me :) I might have lost a few recently when I had to reinstall my laptop after a complete crash, but below you will find those I have recovered and remember to have been using quite a bunch.
Common actions #
st - status -s
dh - diff HEAD
aa - add -A
cm - commit -m
ups - commit -a --amend
Branches #
co - checkout
cob - checkout -b
pur = pull --rebase origin
Log #
This part is mostly different views on logs, honestly I’m not sure it would make sense for anyone but me. Use it for inspiration and go modify it to fit your needs. Tharrr be no silverbullets here neither.
ls = log --pretty=format:"%C(yellow)%h %ad%Cred%d %Creset%s%Cgreen [%cn]" --decorate --date=relative
ll = log --pretty=format:"%C(yellow)%h %ad%Cred%d %Creset%s%Cgreen [%cn]" --decorate --date=relative --numstat
fl = log -u
Feature Image: “El fantástico mundo de git(hub)!” by pablitux is licensed with CC BY-NC-SA 2.0. To view a copy of this license, visit https://creativecommons.org/licenses/by-nc-sa/2.0/