Skip to content

How to exclude unrelated commit tags when extracting part of the repository #200

Closed Answered by newren
Rgzevs asked this question in Q&A
Discussion options

You must be logged in to vote

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 even git 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…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by newren
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants