Creating Git Aliases from Command Line

Creating git aliases is as easy as it is useful to speed your production time in development. The hard way — not so hard, actually — is as simple as adding a string in your /home/$USER/.gitconfig file. Like so:

[alias]
    co = checkout
    st = status
    unstage = reset HEAD --
    wc = whatchanged

Well, if you do not have any aliases configured yet, create an [alias] block there and start appending your aliases.

However, the easiest way is to issue a command line in your terminal, and the alias will be added for you and will be ready to be used. E.g.:

git config --global alias.st status

or

git config --global alias.wc whatchanged

Keep adding them as you wish.

To use them, just issue git <your-alias> [args]  from the command line.

Go ahead and share your most used aliases in the comments.

Thanks for reading.