I had a repo structure like this before 1 year :
repo1/ subrepo2/ . . .
before one year I moved the subrepo2 to its separate repo so I created 2 repos :
repo1/
and
subrepo2/
for one year I made changes to both the repos and now I have to merge them back preserving history.
when I am trying to follow the steps available in most of the questions, I cannot see the history for that one-year, and I do not want to lose it.
Please help.
the steps I followed for merging them back :
in subrepo2 branch:
git filter-branch -- --all
mkdir subrepo2
mv * subrepo2
git commit -m "moving everything in a directory"
then in repo1 branch
git remote add migration feature/migration <path to>/subrepo2
git pull -f migration --allow-unrelated-histories
git remote -rm migration
git commit