Coda Chang Coda Chang - 1 month ago 17
Git Question

Make a simple git alias

Environment: Mac OSX 10.10

It's a simple question, but I am not familiar with it.
Here is what I want, I want to make a commend like

gpgh
, and it will do
git push
and then
git push heroku master
.

I wrote a
bash
and put those two command into it, and I could use
bash ./gpgh.bash
to execute. But how do I make a easy way, just type
gpgh
to do this feature ?

Answer

Just add this into your bash profile.

alias gpgh='git push; git push heroku master'
Comments