Issues with git version rollback and Push
阿神
阿神 2017-05-02 09:26:34
0
3
638

Let me describe:
I now have 3 version numbers commit id: a, b, c. I am currently on c and have pushed it to the remote library
I need to roll back to b. Then edit and submit (if the version number is b1), and then push to the remote library. What should be done?

Question 2:
I need to save both the modification of b1 and the modification of c, then edit and submit, and then push to the remote library. What should I do?


I finally reset --hard, then merged to the master, and the editing of the c node was discarded. Thank you everyone for your enthusiastic help


The reason why I encountered this problem is as follows when I think about it:
When I was at node b, one requirement had been completed. I continued to work on the next requirement at this node, but I received a notification that I needed to complete the next requirement. Put the first requirement online, and that's it
So I should create a new branch after completing the first requirement, and continue to work on the next requirement on the new branch
Do you think this is the case?

阿神
阿神

闭关修行中......

reply all(3)
淡淡烟草味

You just need to know about git revert.

$ git revert b(a commit id)
巴扎黑

What is the submission id? Falling back to 2 (what does 2 mean), the description is very confusing.

某草草

I don’t quite understand. Since I want to save the modification of c, I can just change it directly based on the c node.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template