Hi guys I have a question. When I push to Git I do:
git add .
git commit -m "My message"
git push origin master
and right after that if I repeat the previous steps to push to Heroku I get:
nothing to commit, working directory clean
but if I run:
git push heroku master
it star doing a bunch of things like Installing dependencies, etc. that are unnecessary.
What's the right way to do it? Thanks.
2 Answers 2
Only push to heroku master when you want to deploy your code to Heroku. Otherwise, simply push your code to origin. Once you are ready to deploy again, push to heroku.
Comments
git add .
git commit -m "My message"
git push origin master
The above commits your work and send it to git. To deploy your application (from git to heroku) you use the following:
git push heroku master
It will send the code in your git (branch master) to heroku.