简体   繁体   中英

Unable to push local changes live using Git Push Heroku Master

I'm new to GitHub and have gotten myself into a tangle. I've been successfully deploying code to a Heroku / Django app. However, my last commit was unsuccessful. This is my flow...

- Git add .
- Git commit -m "social media icons"
- Git push heroku master

The last command returns....

Fetching repository, done.
Everything up-to-date

Everything is not up to date. One thing I've discovered on my GitHub app is that I have 2 branches "production" and "master". Master was last updated Sept 8th. I've run a few commands including "git pull origin master" and "git push -f" based on other Stack answers. The latter did seem to push something but not the changes in local. Sorry, I'm trying to find my feet here!

If you're on production branch then you will need to do

git push heroku production:master

Heroku will only deploy the master branch so this command is you pushing your local production branch into the master branch on the remote.

So you are on branch production but your other branch master is up to date. If you want to push the current branch you are on, you should explicitly say so: git push heroku production .

I would highly advise you to try git , it's an excellent resource.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM