git add -p
Interactively stage files.
The best part about this command is that you can add, not add or split a hunk. I’ve started using this command constantly to double check the modifications I’ve made and it’s ridiculous how often I would otherwise commit debugging code and stupid comments into repositories.
`pretty=format:%C(yellow)%h%Creset -%C(red)%d%Creset %s %Cgreen(%ar) %C(bold blue)<%an>%Creset`
%d is a format option that shows ref names
I stole that line from Gary Bernhardt’s dotfiles. The %d there shows which commits have pointers to them. It’s a reminder to delete merged branches and a better visualisation of your divergence from master or other branches. It is beautiful.
git config –global rerere.enabled = 1