Suppose there is a package A registered on
General that need to be moved to a subfolder
lib inside package B. If I understood correctly, after the merge, one should be able to find all the older versions after
git clone repo B as the info on the registry will be modified to be the repo B.
What I have done is as follows. I used
git filter-repo as in here on package A and then I did a merge following the steps here. The only differences from the steps in the git-subtree-merge here are that I set the remote to the local package A after applying
git filter-repo --to-subdirectory-filter on A
and I also add the flag
--squash in the
merge command to prevent all the commits showing up in the new commit history.
The entire process looks like this:
cd A git filter-repo --to-subdirectory-filter A cd B git remote add -f tomerge A git merge -s ours --no-commit --allow-unrelated-histories --squash A/master git read-tree --prefix=lib/ -u tomerge/master git commit git push
So, here is the issue. I follow the tests here to verify whether the
SHAs for all the old versions of package A can be found in repo B. If I do that in the local repo where the merge happened, then I can find all the trees for the old versions of A. But, after
git push to GitHub and then
git clone. I cannot find the old versions in the new local repo.
What would be the correct steps to do for the package merge? Thank you!