Useful git aliases


Here's a sample .gitconfig file which you can put in your home folder (or replace/merge the alias block if the file already exists):

[user]
name = Firstname Lastname
email = firstname.lastname@example.net

[color]
status = auto
diff = auto

[alias]
st = status
ci = commit
br = branch
co = checkout
df = diff
lsd = log −−graph −−pretty=format:'%Cred%h%Creset −%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' −−abbrev-commit