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 branch
git config –global commit

git config –global checkout
git config –global status
git config –global alias.df diff
git config –global alias.undo “reset –soft HEAD^”
echo “Adding git log aliases”
git config –global “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: Logo

You are commenting using your 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