Awesome Git aliases

Copy and paste the code below at your terminal.

echo “Adding git pull/push aliases”
git config –global alias.pop “push origin production”
git config –global alias.plp “pull origin production”
git config –global alias.pom “push origin master”
git config –global alias.plm “pull origin master”

echo “Adding git aliases”
git config –global alias.br branch
git config –global alias.ci commit

git config –global alias.co checkout
git config –global alias.st status
git config –global alias.df diff
git config –global alias.undo “reset –soft HEAD^”
echo “Adding git log aliases”
git config –global alias.gl “log –graph –pretty=oneline –abbrev-commit”
git config –global alias.lg “log –graph –pretty=format:’%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset’ –abbrev-commit –date=relative”

echo “Adding git colors”
git config –global color.branch auto
git config –global color.diff auto
git config –global color.interactive auto
git config –global color.status auto
git config –global color.ui auto

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s