Drop old commit: `git rebase` causes merge conflicts

后端 未结 2 1025
Happy的楠姐
Happy的楠姐 2020-12-11 05:25

Unfortunately we accidently checked in a large binary file some time ago and until today nobody noticed. Now I want to drop that commit and have the remaining history as it

2条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-11 06:10

    I'd go with filter-branch:

    git filter-branch --prune-empty --index-filter '
      git rm --cached --ignore-unmatch path/to/file
    ' --all
    

提交回复
热议问题