3
I needed to reverse a commit and locally it works well. Now when I push to my repository, it presents me with error.
My attempt
git fetch origin c6f1668e2fac57401a99a2184a47f0b58c15e403
git reset --hard FETCH_HEAD
git add .
git commit -m "revrt"
git push
ERROR
! [rejected] master -> master (non-fast-forward)
error: failed to push some refs to 'https://gitlab.com/XXX'
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.
Now, if I give PULL back to a version I don’t want. What I do?
Thank you! :)
It’s become a great knowledge base that your answer
– Jefferson Quesado