Git Aliases

October 13, 2011 | By Duchateaux.

A nice Effort and Time Saving possibility Git offer are Aliases.
The General form of a Git Alias is:

git config --global alias.nameOfAlias commandToReplace

If you want to Resume a Composite command in one Alias you need to put it between quotes.
Here below I give you some example about how to Create Aliases.
Examples:

git config --global alias.co commit

So that

git co

Correspond now to:

git commit

For a Composite Alias:

git config --global alias.unstage 'reset HEAD --'

So than now

git unstage fileToUnstage

Substitute

git reset HEAD -- fileToUnstage

QuickChic Theme • Powered by WordPress