October 2016
Beginner
861 pages
20h 37m
English
In Chapter 2, Git Fundamentals – Working Locally we already mentioned Git aliases and their purpose; in this paragraph, I will suggest only a few more to help you make things easier.
One thing you can find useful is to shorten common commands like git checkout and so on; therefore, these are some useful aliases:
$ git config --global alias.co checkout $ git config --global alias.br branch $ git config --global alias.ci commit $ git config --global alias.st status
Another common practice is to shorten a command by adding one or more options that you use all the time; for example set a git cm <commit message> command shortcut to alias git commit –m <commit message>:
$ git config --global alias.cm "commit -m" ...