Answer the question
In order to leave comments, you need to log in
How to roll back commits if they are already uploaded to github?
All the best!
I rolled back the last 2 commits in git with the following command git reset --hard HEAD~2 I do the git push origin master command and he asks me to do a pull first, but if I do a pull, then those commits that are already there will come back to the local one and it turns out that I will fill in the same. Tell me what should I do?
to tell the truth, I just re-uploaded the repository (all the data is still stored in .git so nothing has changed), but damn, it's primitive like that. maybe there is another way around this pull ?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question