Elena' s AI Blog

Type Less, Do More: My Top 10 Git Aliases

13 Feb 2026 (updated: 14 Sep 2026) / 6 minutes to read

Elena Daehnhardt

Generated by Midjourney. Prompt: AI-assisted coding with a robot reviewing a pull request.

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.

Git Aliases: Configuration Basics with git config --global alias

Git aliases are shortcuts that map short commands to longer Git functions, defined in your .gitconfig file (usually in your home directory) or set directly from the command line. Aliases created with the --global flag apply across every repository on your machine; aliases created without it apply only to the current repository, stored in that repo’s .git/config file instead.

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

Here are my top essential aliases.

Configuring Basic Git Navigation Aliases (co, br, ci, st)

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.

Git Log Alias: Colorized Graph Output with git lg

πŸ”’ Subscribe to keep reading.

Amending Commits with the Git Oops Alias (commit --amend --no-edit)

πŸ”’ Subscribe to keep reading.

Key Takeaway: Git Aliases Reduce Repetitive Command Typing

πŸ”’ Subscribe to keep reading.

You've hit a Deep Dive tutorial.

I spend dozens of hours researching, coding, and breaking things to write these guides. This content is free, but reserved for my subscriber community. Drop your email below to unlock this guide (and all past/future deep dives):

Already a subscriber? Use the magic link from your last newsletter, or reset your password.

New subscribers get an inbox mail: Set a password to unlock articles. The form does not log you in β€” use the same email afterwards.

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