Tired of 'git add .'?


Using Git is a big part of every developer's workflow whether they use a GUI or the terminal. Wouldn't making things a little faster make it a little more fun?
`git commit -am`: A Quick Time-Saver
One simple but effective shortcut is the git commit -am
command. It combines git add .
and git commit -m
into one, saving you a few extra keystrokes. However, it's important to note that this won't track new files that Git doesn't yet know about. Still, in many cases, this shortcut can speed up your workflow.
When GUIs Don't Cut It
For me, using a GUI has been a bit hit-or-miss, especially with the large projects I work on. In my current role, I use Visual Studio 2022, and I’ve found that using the Git GUI causes the entire IDE to freeze up for what feels like a minute. When I'm making frequent commits, this delay can be frustrating. That's why I prefer using the command line or terminal—it's faster and more responsive.
Take It Up a Notch with ZSH Aliases
This can can get a bit better though! If you use ZSH there are some predefined git aliases at your disposal. You can shortcut all that typing to simply gcam "message"
followed by gp
. For me small things like this can make coding that much more enjoyable, that's why I'm going through the effort of learning VIM motions more deeply.
I hope you found this helpful. I haven't posted in a while so this is me getting back into it.
Happy coding!
Subscribe to my newsletter
Read articles from Diego hernandez directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
