Lets see a small tip that can make our Git experience more easier in dealing with Git commands by creating aliases.
By using aliases feature we can able to map the Git commands with our own set of languages (probably some decent words). 🙂
Here are few samples,
we can able to create alias by executing following commands in Git bash
$ git config –global alias.drag pull
$ git config –global alias.drop push
$ git config –global alias.st status
After setting alias, we can use the alias name instead of the Git command keyword.
For example,
If we wish to view the staus of repository, we can simply execute the following command
$ git st
Few more,
pandiyan@TARZAN MINGW64 /d/usr/Pandiyan/Repos/ElasticBridge (master)
$ git config –global alias.drag pullpandiyan@TARZAN MINGW64 /d/usr/Pandiyan/Repos/ElasticBridge (master)
$ git drag
Already up-to-date.pandiyan@TARZAN MINGW64 /d/usr/Pandiyan/Repos/ElasticBridge (master)
$
We can also edit them or add more by modifying the .gitconfig file directly:
[alias]
drag = pull
st = status
Just try out.
Happy coding !