Git Aliases
Git is a version control tool used to track and manage source code files and changes to those files. In sharing some of my development tooling setup, I want to promote the use of git aliases as an “Express” route or shortcut to commonly used commands.
I don’t see enough people using them. People seem content to type out long commands that they use on a regular basis.
I just wanted to share a few of my favorite aliases here.
My Favorite Aliases
Git aliases are defined in the .gitconfig
file in your Home directory.
Example Usage
Instead of typing:
I can type:
Instead of:
I only need to type:
When I accidentally commit changes to the wrong branch, it’s so easy to just “uncommit” them.
Note: You should never uncommit something that has already been pushed to a remote.
What git aliases are your favorites?