-
I've inherited a repository that contains several unrelated projects and am trying to split it using
So if I want to filter only commits from folder A, I'm expecting the resulting commits to be like this:
But when I run
So it looks like all tags from the commits that have been filtered out are added to the next commit that fits the filter. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
When filter-repo removes commits because they have no more logical changes, any tags pointing to those commits need to be rewritten to the nearest ancestor. So, the case you describe above suggest that tags <2> and <3> pointed to commits that contained the history to which <4> more directly pointed. In such a case, I wouldn't say the tags are unrelated. However, it is perfectly fine to delete tags (or branches or other refs) before running filter repo. |
Beta Was this translation helpful? Give feedback.
When filter-repo removes commits because they have no more logical changes, any tags pointing to those commits need to be rewritten to the nearest ancestor. So, the case you describe above suggest that tags <2> and <3> pointed to commits that contained the history to which <4> more directly pointed. In such a case, I wouldn't say the tags are unrelated.
However, it is perfectly fine to delete tags (or branches or other refs) before running filter repo.
git tag -d $tagname
. (Or evengit update-ref -d refs/tags/$tagname
). Or you can delete them after with the same commands. Since commits don't belong to branches or tags, but rather branches and tags just point to some commit (and each commi…