Answer the question
In order to leave comments, you need to log in
How to rollback to a commit by id?
Hello, the topic is hackneyed but still incomprehensible.
I made a commit/push in the morning. After that, there were changes that need to be completely reverted and returned to the state of the morning commit.
How to roll back everything to the morning state. And at the same time stay in the main branch.
Made git checkout some_ID
Accordingly received detached HEAD
also the requirement to create a new branch.
How next?
1) Revert all changes made since the morning commit everywhere. How to do it?
2) Being on the morning commit, create a new branch and then merge into MASTER?
Tell me how to do it correctly so as not to lose all the data at the time of the morning commit.
Thanks in advance.
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