Why heroku push is being rejected?

How do I set up an alias for "git push heroku master"?

  • such that i can just write git push, as opposed to git push heroku master

  • Answer:

    I don't know if there's something already built into Git, but you can do something like this (via Terminal): $ alias letspush="git push heroku master" Then use the command "letspush" to push changes to heroku: $ letspush Note: you can change "letspush" with whatever you want. This solution will stop working as soon as you reboot. If you happen to like it, you can make it permanent by adding the alias command at the bottom of your ~/.bash_profile. You can do this via Terminal: $ echo "alias letspush=\"git push heroku master\"" >>  ~/.bash_profile Again, change letspush as you like.

Giovanni Piller Cottrer at Quora Visit the source

Was this solution helpful to you?

Other answers

You can configure Git to record an alias. Add this to your gitconfig file : [alias] deploy = push heroku master Now you just need to write git deploy. Of course if you don't like 'deploy' you can use any other alias that you want. If you're new to aliases in git, read here for some common/useful aliases :

Nikhil Garg

Just run 'git push -u heroku master' and then from then on you can just run 'git push'

Chris Bolton

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.