Typo Forgiveness in Git & Bash

I’m often moving pretty quickly when it comes time to commit work to Git. I have a bit of a workflow down, and I type the same few shortcuts frequently:

$ git st (expands to status)
$ git ks (expands to difftool, which opens Kaleidoscope)
$ git add -A
$ git ci (expands to commit)

Regularly, though, my fingers will transpose the t in Git and the space that follows it: gi tks.

This has become frequent enough that I finally took the time to address it by making the desired action still occur:

$ git config --global alias.tst status
$ git config --global alias.tks difftool
$ git config --global alias.tci commit

Then, in ~/.bash_profile:

alias gi=git

Now when I make a mistake, Git does what I want and I don’t lose my flow. It’s a small thing, but it’ll improve my day a little bit a dozen times a day.


Mentioned in this post: Kaleidoscope, the (mostly) fantastic diff visualizer from Black Pixel.

 
2
Kudos
 
2
Kudos

Now read this

Reordering Presets and Preset Groups in Lightroom Classic

Lightroom presets are an incredibly powerful tool for managing and editing your photos quickly and consistently, but as your catalog of presets grows, so too does the time you spend scrolling through those presets looking for the one you... Continue →