Git Aliases

October 13th, 2011 by Regaz

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.

git config --global 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


git reset HEAD -- fileToUnstage

Tags: ,