在我们的回购的历史中有一个承诺,推动等。我有SHA,我想运行相当于git revert /one/folder/* THESHAID
,但git恢复看起来不像它只能更改特定文件夹。如何恢复部分提交?
有没有一种方法来复制该功能?
在我们的回购的历史中有一个承诺,推动等。我有SHA,我想运行相当于git revert /one/folder/* THESHAID
,但git恢复看起来不像它只能更改特定文件夹。如何恢复部分提交?
有没有一种方法来复制该功能?
这是足够古怪一点也不奇怪,没有它的按钮,特别是当蛮力方法是如此简单:
git revert that_commit # do the whole revert
git reset --hard HEAD^ # in what turns out to have been a throwaway commit
git checkout [email protected]{1} -- one/folder # and just take what you want of the results
,使其包含所需的更改您可以手动编辑补丁目录,然后还原修补程序(修补程序-R -p1)&提交。 –
brokenfoot