简体   繁体   中英

remove a file from an old commit not pushed yet (Git Extension)

I'm facing a peculiar situation here.

情况

I must change the behavior of [4]xxxMerger.py and delete [4]xxxWriter wich means cascading this to commit [5] [6] [7]

How can I do that?

I know that I can add file to commit with fixup, or even change them then rebase on origin. I can change a commit message by rebasing on origin and asking for a reword on the commit.

But for this. I can't do a fixup since I'm at [7] and therefor those 2 file are renamed. If I checkout [4] it wont' allow a fixup since I won't be on any branch.

may be this is simple, but I'm quite new to GIT.

Thanks.

git rebase --interactive <commit 4>然后将commit“ 5”设置为fixup,并且其中的更改将合并为4,然后在其顶部应用6和7。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM