Stop Aliasing Your Git Commands

Gant Laborde
Red Shift
Published in
4 min readJan 3, 2017

--

OH HELLLLL NO! This crazy guy is one of those crazy Git idealists who want us to learn insane ‘Git plumbing’ commands. He’s probably got a shrine to Linus Torvalds on his wall that he talks to everyday.

I took the shrine down! So you’re not even half right. I’m not a Git idealist. I wouldn’t even say I’m good at Git theory. I actually have to Google my fancy git commands whenever they stray from my usual ten or twelve memorized, knee-jerk, typing-tirades.

OK… So what’s up with the Git alias hate?

The system sucks. You see that right?

Many of us devs keep pretending Git needs just one more alias in order to be friendly (for us). We get that alias from the wrong place, i.e. from friends, popular blog articles, or worst of all, our own crazy brains.

When all is said and done, our Git shortcuts are as sordid and unique as our dotfiles. We designed our own Git prison. THAT is what sucks.

At that moment, we’re locked in to a CLI that is spoken fluently by only one person. Even though we’re proud of how it’s customized and quick, it is for us alone. All breakthroughs, local and abroad, are marooned to their machine islands. We’re all reinventing our own wheel as Git suffers.

OK, hotshot! How do you plan on changing Git?

I honestly don’t think changing Git upstream is the best plan. I’m advocating the same growth most software has evolved into: “midstream” Git packages. Git needs a place where ideas can be shared, debated, and agreed upon. Rather than people borrowing commands from one another, the “midstream” Git packages would borrow concepts that can be discussed and document in one place! No one needs a ten-minute lecture to know that they should add your rockin’ git staaash alias on their laptop. Shared libraries are more mobile, friendly, and educational for the community.

So now each of us publishes our own Git alias standard?

Nope. Well… kinda. It’s very likely someone already has your commands. So grabbing something amazing off the shelf like the Oh-My-Zsh git plugin or Git extras will be more than you could ever need. These friendly command packages are used and abused every day by thousands. Yes, you might find something missing, but that’s a perfect opportunity to test that idea and contribute. Finding something new and useful shouldn’t be hidden on your machine. You can send a pull request and have your idea scientifically challenged for its utility. The end result is that you end up smarter and contribute to Open Source! Everyone wins.

My friend and co-worker said it really well when discussing the issue; to paraphrase him:

If Git came out today, aliases would be mid-to-upstream concerns. It’s only because it superseded today’s sharability that it is based in single-user solutions. — Kevin VanGelder

What if I don’t like what’s out there? Or they don’t merge my suggestions?

You’re probably not alone. And then… publish! If you’re lucky enough to stumble upon something opinionated and fresh, don’t just share it ad hoc. Publish it in an open source package so others like you can use it. Set the stage for ideas to flow back and forth. When people simply copy aliases we make stale, undocumented architecture, not advancements. Publishing what works for you is what Git needs.

I see what you’re saying, but I’m not getting rid of my aliases.

Good! I’m not talking about killing your productivity or your aliases; just share them in a better medium. Sending someone aliases that they can add to their bash should stop. This article is about what works going forward. I’ve already mentioned two awesome git libraries (I use both), and your contributions to those would help us all. If you find any other “midstream” libs that you like, yes YOU, please leave me a note on Twitter.

Kudos to all the devs who’ve shared their Git ideas, shortcuts, and knowledge thus far. The challenge now is to command controlled versioning to our version control commands.

About Gant

Gant Laborde is Technical Lead at Infinite Red (⚙ web and mobile app dev ⚙), published author, adjunct professor, public speaker, and mad-scientist in training. Read the writings of Gant and his co-workers in our Red Shift publication. If you’re looking to discuss nerdy tech, he’s all ears. If you’ve got a conference tech, he’s happy to present.

View half-witty, half-groan technical tweets with @GantLaborde on Twitter, and follow him on Medium and GitHub.

P.S. Rocket League Rules ^

--

--

Software Consultant, Adjunct Professor, Published Author, Award Winning Speaker, Mentor, Organizer and Immature Nerd :D — Lately full of React Native Tech