Git command line is pretty confusing. Here are some aliases that I found helpful that normalize it with other command line commands and add a little bit better context.
Open global .gitconfig
file:
$ open ~/.gitconfig
If there isn’t an [alias]
section already, add one:
[alias]
cd = checkout
ll = branch
ls = branch
delete-merged = !git branch --merged | egrep -v \"(^\\*|master|development)\" | xargs git branch -d
mk = checkout -b
new-up = !git push -u origin `git symbolic-ref --short HEAD`
stage = add
unstage = reset HEAD
Update 2018-07:
To set VS Code as the default editor for commit and merge messages:
[core]
editor = code --wait