Remove / cut off Git's revision / commit history

后端 未结 4 411
难免孤独
难免孤独 2021-02-04 04:36

I have a project that contains traces to another project of myself that I\'ve used as a kind of a template project. Now I want to remove these traces entirely from the repositor

4条回答
  •  盖世英雄少女心
    2021-02-04 05:12

    I know that's an old question, but I landed here today searching about this topic...

    For the large amount of commits problem, you can try using "-X theirs" or "-X ours" in the rebase command, i.e.

    git rebase -X theirs -i HEAD~20

    the difference between the two it's explained here

    I hope that can be useful to someone

提交回复
热议问题