flask - git remote library rollback problem
伊谢尔伦
伊谢尔伦 2017-05-02 09:26:03
0
2
564

I have deployed flask on heroku
I need to modify the code and resubmit it. I mistakenly switched the path to another folder and submitted the master branch of this wrong folder to the remote library
The command is git push heroku master
And I switched to the correct code folder and then submitted it, the prompt

 ! [rejected]        master -> master (non-fast-forward)
error: failed to push some refs to     'https://git.heroku.com/hulumei.git'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Integrate the remote changes (e.g.
hint: 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.  

If I use git pull, the error code of the remote warehouse is merged with the local code. Then I use the git reset --hard version number command to roll back to the correct node, and then submit it to the remote library, but the above prompt is still there. Information
Can you please give me an answer? Thank you

伊谢尔伦
伊谢尔伦

小伙看你根骨奇佳,潜力无限,来学PHP伐。

reply all(2)
阿神

If you can confirm that the code of your current branch is correct.

git push heroku master --force
習慣沉默

Undo remote recording

  • git reset --hard HEAD~1 #Undo a record

  • git push -f heroku HEAD:master #Sync to remote warehouse

git undo remote records

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template