newren / git-filter-repo

Quickly rewrite git repository history (filter-branch replacement)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

git filter-repo --invert-paths --path <directory/file> creating duplicate branches

Bharath0601 opened this issue · comments

I am trying to remove a file from git history using git filter-repo using the below command

git filter-repo --invert-paths --path <directory/file>

git filter-repo --invert-paths --path <directory/file> Parsed 57789 commits New history written in 15.33 seconds; now repacking/cleaning... Repacking your repo and cleaning out old unneeded objects Enumerating objects: 601836, done. Counting objects: 100% (601836/601836), done. Delta compression using up to 12 threads Compressing objects: 100% (109070/109070), done. Writing objects: 100% (601836/601836), done. Selecting bitmap commits: 83010, done. Building bitmaps: 100% (321/321), done. Total 601836 (delta 509044), reused 577850 (delta 485065), pack-reused 0 Completely finished after 97.30 seconds.

The command was executed successfully with the above results, however, it created some duplicate branches with almost similar names with a difference in case, How to avoid creation of duplicate branches in this scenario?
I have been reading some documents that this operation may create duplicate branches if the file is part of too many branches and in order to accommodate changes and to help in preserving the integrity of the repository history.