DEV Community

Discussion on: Stop aliasing core Git commands

loderunner profile image
Charles Francoise

You're catching a lot of "I do what I want" in the comments, but I fully support this idea. I expect everyone to be proficient with bare bones git, be able to share scripts, shell history and the likes.

As for those who don't want to type more characters, this two-liner will set you up for tab autocompletion with git... if you're on a Mac with brew installed. But there's probably a similar trick for Linux (or it might even be installed by default).

brew install bash-completion@2
ln -s /Applications/ /usr/local/etc/bash_completion.d/git
Enter fullscreen mode Exit fullscreen mode

You can even use tab completion for branch names now. 🙌

senjai profile image
Richard Wilson

This article isn't stating "don't use git aliases in scripts" it's stating subjectively that completion is better for you.

Even if you alias everything under the sun, in scripts you want to share or work regardless of changes to aliases you can still use the original commands.

gonedark profile image
Jason McCreary Author

Ha. That's a good way to put it. Thanks for reading the full article.