oh-my-zsh git aliases

zsh combined with oh-my-zsh is my daily driver on the terminal and I love it. Here is one of there reasons why: git aliases

  • g : git
  • ga : git add
  • gaa : git add –all
  • gapa : git add –patch
  • gc: git commit
  • gcmsg: git commit -m
  • gst: git status
  • gp : git push
  • gl : git pull
  • gd : git diff
  • gco : git checkout
  • glg : git log –stat

Those are the ones I use the most. The full list can be found in the plugin page

Why?

I have recorded myself typing git commit and gc in the terminal and made some math to find out how much time I am saving with this shortcut:

  • Recording FPS: 25
  • Average time for typing git commit 5 times: 1976 ms
  • Average time for typing gc 5 times: 248 ms
  • Time saved on an average day with 20 commits: (1976 – 248)*20 = 34560 ms
  • Average time saved in a year with 261 working days minus 1 month of holidays: 34560 ms * (261 – 24) = 8190720 ms = 2 hours 16 minutes

2 hours per year for just 20 commits with one shortcut. Add more of these and you can see where this is going.

I really believe that big results can come from small changes and optimizations here and there. I hope you found this useful too.

Leave a Reply

Your email address will not be published. Required fields are marked *