I needed to roll back a commit and locally it works fine. Now when I give PUSH to my repository, it gives me 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 do not want. What do I do?
Thank you! :)