Saturday, December 15, 2018

GIT : Aliasing commands

Git aliasing is one of the good feature in GIT. You can create your own GIT Commands from combination of other Git commands and other OS commands with help of Git aliasing. you an define the Git alias commands in git configuration in the alias section.

Let create an alias for 'git status'.

git config --global alias.s "status"



Let's create single command for 'git status' and 'ls -lrth'

git config --global alias.s '!git status && ls -lrth'



These configuration are stored under "~/.gitconfig".







No comments:

Post a Comment