Answer the question
In order to leave comments, you need to log in
How to rollback multiple git commits in eclipse?
There were some troubles with the commits. Thoughtlessly created several commits of one task, now you need to roll back to the previous one. The photo below shows the history in git, you need to rollback to the Collections 4 task. How can this be done?
Answer the question
In order to leave comments, you need to log in
git checkout [good commit id]
git branch new-branch
git push new-branch origin master -f
git checkout master
git branch -d new-branch
git fetch master
Something like this, I'm writing from a mobile phone, there may be typos. But this is not a good option. It's better to just fix the branch and move on.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question