I have two repos git@remote:fruit.git
and git@remote:veg.git
and the Fruit repo contains a folder that does not belong there logically.
fruit
|-.git
|-apples
| |-royal_gala
|-oranges
| |-tangerine
|-beetroot
|-sugar_beets
git-subtree seems to be the tool for the job, so I did the following:
git clone git@remote:fruit.git
git clone git@remote:veg.git
pushd fruit
git subtree split -P beetroot -b beetroot
popd
pushd veg
git subtree add -P beetroot ../fruit/ beetroot
git push
popd
pushd fruit
git rm -rf beetroot
git push
popd
This accomplished the task of moving the files but did not move the history. Is it possible to modify this procedure to move the history of beetroot changes or should I abandon git-subtree altogether?