I've deployed my directory to Heroku using git push heroku master
, but nothing happens.... Everything up-to-date
is what the screen reads.
How can I push to Heroku the exact version that I am running locally, since the local version does the things I want?
If you are sure that the source codes itself are not the same in these two branches, you can use force push:
# Make sure you are on your local master branch
git branch
# Make sure that your remote address is correctly set
git remote -v
# Then force push your master branch to heroku remote master branch
git push heroku master -f
force pushing a branch to a remote will force the remote branch to take on the branch’s code and git commit history
But if you don't have access to check the source code, check if Environment Variables are the same on local machine and server or not (e.g. NODE_ENV variable)
Moreover, Double check automatic deployment of heroku (if exists) as well as the node and npm version of both machines and be aware of the command you run on both machines (npm start
or node .
or ...) that may have different operations based on envs or so.
Please check the branch or remote url of heroku.
In heroku click Deploy tab and find out the branch. Add the remote url in your local machine terminal.
1) heroku git:remote -a projectname 2) git status 3) git add . 4) git commit -m "message" 5) git push heroku master
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With