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.

Image for post
Image for post
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.

Image for post
Image for post

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

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store