Git aliases
Git allows to define your own aliases, which is very convenient to create shortcuts.
In your home directory, create a .gitconfig
file to define the aliases.
Here is below an example of useful aliases I use:
[alias]
st = status
co = checkout
ci = commit
br = branch
unstage = reset HEAD --
last = log -1 HEAD
dag = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' --all
[user]
email = john.smith@email.com
name = John Smith
[core]
autocrlf = input
excludesfile = ~/.gitignore
comments powered by Disqus