我们的设计师对一些图片进行了更改,并提交了更改。现在,我们的git log
看起来像这样:
Commit 1: Changed images
Commit 2: Oops, forgot to commit a few images
...然后业务部门想要它们看起来不同,于是设计师进行了更改,并再次提交:
Commit 1: Changed images
Commit 2: Oops, forgot to commit a few images
Commit 3: Changed images again
Commit 4: Minor tweaks to new images just committed
现在业务决定他们更喜欢最初的图片。因此,我们现在需要回滚到最初的状态。我尝试了几种不同的方法,我认为我需要使用 git revert
的方法来创建一个新的提交,将图片恢复到之前的状态。然而,当我尝试执行此操作时,似乎出现了冲突。我应该如何做才能强制覆盖新的图片并用 Commit 1
和 Commit 2
中所做的更改?