Git: revert on older commit
问题 I did some changes on my git repo and did some commits. Here is what I want to do, say my git history looks as HEAD --> c1 --> c2 --> c3 --> c4. Questions 1) Now if I revert c1, does it revert all c2, c3, c4 as well ? My understanding it reverts only c1 and leave c2, c3, c4 as is. 2) Now I want to revert all c1, c2, c3 and c4 and move back to HEAD. What is the best way to do this. 回答1: Revert will create a commit that will undo the changes of the revision you want to revert. So if you do: git