I'm migrating a repository from svn to git.
In this last step, I want to remove tons of files that aren't needed from the history.
I'm trying the following command:
git filter-branch --prune-empty --index-filter \ "for file in $(cat files); do git rm -rf --cached --ignore-unmatch ${file}; done" -f But it says that the argument list is too long.
I could rewrite this like:
for file in $(cat files); do git filter-branch --prune-empty --index-filter \ "git rm -rf --cached --ignore-unmatch ${file}" -f done But it will run filter-branch tons of times, and the history is long.. so, it would take too much time.
Is there a faster way to filter-branch removing lots of files?
filter-branchto remove a lot of files? Have you tried them? (There's more than one method). Which ones did you try? Did you see any error messages or other indications of why they might have failed?forend..