The other day I was watching a video and noticed that when they would “git add” and “git commit” they would type “ga” and “gcm”. I became so intrigued by it. A way to type even less? Count me in!

Creating aliases in ZSH is pretty simple. First you need to open your .zshrc file. This file is located in your home directory on mac.

i like to edit using vscode

Once we have our .zshrc file open, we can add aliases. I just added mine to the bottom of the file.

The syntax for the config file is:

So if we look at my first alias:

I’m creating an alias called dev. When i type dev it will go to my Development directory from where ever I am in my terminal.

The next lines are my git commands that I don’t want to fully type out.

Hopefully you find this information useful and save you a couple extra keystrokes per day!

Fullstack Software Engineer