For reasons outside of my control, I am working with a repository that has many copies of similar content (a small OS). This means that while the repo size is fairly small, the working directory takes multiple hours to checkout on my system.
The specific tasks being performed is doing a git replace --graft to concatenate linear histories, then doing git filter-branch --tag-filter cat -- master to make the change permanent.
My issue is that filter-branch requires a clean working copy (such as generated by git checkout . or a standard git clone <URL>). This increases run time to several hours, which is undesirable. Is there a faster way to do this? The actual re-write takes about 30 seconds (all blobs stay the same, just the pointers change).
git filter-branchgenerates an error "Cannot rewrite branch(es) with a dirty working directory."