Drop old commit: `git rebase` causes merge conflicts

后端 未结 2 1026
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 05:58

    My friend started a convenient script for purging files from git history, check https://github.com/donquixote/gitpurge

    0 讨论(0)
  • 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
    
    0 讨论(0)
提交回复
热议问题