Git Things Done and Impress Your Cats
The phrase “know your tools” has echoed through countless industries—and for good reason. Whether you're debugging code or building furniture, familiarity with your tools makes life easier. In software development, it might even earn you a nod of approval from your cat.
Beyond Your IDE
Version control is a cornerstone of modern software development. While Git has become the de facto standard, many developers rely solely on their IDE’s built-in Git integrations. These graphical interfaces are convenient, but they don’t expose the full power of Git.
Not all projects are created equal, and not all Git commands are available via UI. Learning Git’s command-line capabilities can dramatically improve your efficiency and give you finer control over your workflow.
Git Aliases: Your Secret Weapon
Git aliases are a hidden gem—barely mentioned in the official documentation, yet incredibly powerful. They allow you to create shorthand commands that simplify repetitive tasks and personalize your workflow.
You can define aliases globally, per user, or per repository using git config. For example:
git config --global alias.last 'log -1 HEAD'
Now, typing git last
will show the latest commit. This alias gets stored in your ~/.gitconfig
file on Linux systems.
Common Git Aliases
Here are a few aliases that I rely on so heavily, working without them feels like a throwback to the days of CVS:
git config --global alias.co checkout
git config --global alias.br branch
git config --global alias.ci commit
git config --global alias.st status
These shortcuts save time and reduce friction—especially when switching between branches or committing frequently.
Get Creative
Git aliases are just the beginning. Customize your environment to suit your project’s needs. Whether you're squashing commits, rebasing branches, or visualizing history, Git can be tailored to your style.
Your tools should work for you—not the other way around. And yes, your cats will be impressed.
Bonus: Visualize Your Commit Graph
Want a quick visual of your commit history? Try this:
git config --global alias.graph 'log --graph --oneline --all'
Now, git graph gives you a clean, readable commit tree.
Happy coding—and may your cats never judge your merge conflicts.