I know people have asked similar questions, but I believe the causes of their problems to be different. I did a hard reset because I had messed up my code pretty bad
git reset --hard 41651df8fc9
I've made quite some changes, I've made some commits and now that I'm trying to push all these commits into the server I get the following error:
! [rejected] master -> master (non-fast-forward)
error: failed to push some refs to '[email protected]'
Git suggests to do a git pull and that's what other people have suggested to other users. However, I believe that a git pull will merge my current code with the code that I don't want anymore (head revision).
How can I do a push and forget about the version/revisions ahead of me?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…