October 2016
Beginner
861 pages
20h 37m
English
In Chapter 2, Configuration, we saw how we can create aliases and a few examples of them. In this example, we will see some more examples of the useful aliases.
Clone the cookbook-tips-tricks repository and checkout the aliases branch:
$ git clone https://github.com/dvaske/cookbook-tips-tricks.git $ cd cookbook-tips-tricks $ git checkout aliases
Here, we'll see some examples of aliases with a short description of each of them and an example of how to use them. The aliases are just made for the local repository; use --global to make them available for all the repositories.
$ git config alias.b "rev-parse --abbrev-ref HEAD" $ git b aliases