What does that git alias do? 🕵️‍♂️

January 28, 2020

  • git

Originally posted by me on Hashrocket TIL

I have some git aliases in my dotfiles and sometimes I use an alias for too long that I actually forget what it does under the hood.

I can open my ~/.gitconfig file in nvim (which I have an alias for) and search for the line that introduced the alias, but when pairing sometimes it’s easier and faster to just use git help to get the definition of an alias:

git help doff
'doff' is aliased to 'reset HEAD^'

Written by Dorian Karter, a Sr. Software Engineer
Github | Twitter

© 2021, Dorian Karter