I needed to split my git repo into two parts. I used the steps shown here: Detach (move) subdirectory into separate Git repository
The command I used was:
git filter-branch --subdirectory-filter ABC HEAD -- --all
which seemed to work fine and left me with ABC as the root.
However now if if I try to checkout a tag that existed before I split the repo:
git checkout an-old-tagname
it's recreating the old directory structure - so recreating ABC as a subdirectory, along with XYZ1 and XYZ2.
I know that is how the repo really looked at that point in time - but I want the tag to refer to just the ABC bits, as if they'd been at the root back then. I thought that's what filter-branch was doing when it re-wrote history, but obviously I don't grok it properly.
How can I get the tags re-written so I can go back in time while still having ABC be the root of the repo?