Elena' s AI Blog

Type Less, Do More: My Top 10 Git Aliases

13 Feb 2026 (updated: 13 Feb 2026) / 3 minutes to read

Elena Daehnhardt


High Speed Coding, Midjourney 2026

If you click an affiliate link and subsequently make a purchase, I will earn a small commission at no additional cost (you pay nothing extra). This is important for promoting tools I like and supporting my blogging.

I thoroughly check the affiliated products' functionality and use them myself to ensure high-quality content for my readers. Thank you very much for motivating me to write.



TL;DR:
  • Speed up your workflow by creating Git aliases. Shorten 'git checkout' to 'git co', pretty-print your logs, and create complex shortcuts to save keystrokes every day.

Previous: Part 28 β€” Git Hooks: The Robot Butler for Your Code

Next: Part 30 β€” Git Cherry-Pick: The Surgeon's Knife

I am lazy. But usefully lazy.

I believe that if you type the same long command more than three times a day, you should shorten it. Git commands can be verbose, but Git has a built-in aliasing system to fix that.

Introduction

Aliases allow you to map short commands to longer Git functions. You define them in your .gitconfig file (usually in your home directory) or by using the command line.

Here git config --global alias.co checkout allows you to type git co instead of git checkout.

Here are my top essential aliases.

The Essentials

Run these in your terminal to set them up:

# Basic navigation
git config --global alias.co checkout
git config --global alias.br branch
git config --global alias.ci commit
git config --global alias.st status

# Unstaging files (undoing 'git add')
git config --global alias.unstage 'reset HEAD --'

Now, checking status is just git st. It saves milliseconds, but they add up to a feeling of fluidity.

The Visualizer: A Better Log

The default git log is a bit dry. I use an alias called lg that makes it look like a rainbow graph:

git config --global alias.lg "log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit"

Try typing git lg after adding this. It shows you the branch tree, commit hash, relative time (β€œ2 hours ago”), and author name in color. It’s beautiful.

The β€œOops” Alias

Did you commit, but forgot to add a file? Or made a typo in the message?

git config --global alias.oops "commit --amend --no-edit"

Now, if you forget something:

  1. git add forgotten_file.py
  2. git oops

And it’s merged into the last commit like nothing happened.

Related tools you may want to try next.

Play.ht can generate voice from text prompts, creates audio embeddings and play buttons for WordPress or any web page, podcast creation, and much more in respect to voice synthesis.

Conclusion

Customizing your tools is a hallmark of a senior developer. It means you understand your workflow well enough to optimize it.

Take a few minutes to configure these aliases. Your fingers will thank you.

Did you like this post? Please let me know if you have any comments or suggestions.

Git posts that might be interesting for you




desktop bg dark

About Elena

Elena, a PhD in Computer Science, simplifies AI concepts and helps you use machine learning.



Citation
Elena Daehnhardt. (2026) 'Type Less, Do More: My Top 10 Git Aliases', daehnhardt.com, 13 February 2026. Available at: https://daehnhardt.com/blog/2026/02/13/git-aliases/
All Posts