git checkout master
git pull
git checkout -b export
git mv public_html lib/legacy/api
git mv .gitignore lib/legacy/api
git mv bootstrap.php lib/legacy/api
git mv composer.json lib/legacy/api
git mv composer.lock lib/legacy/api
git mv Rollbar.php lib/legacy/api
git commit -m "Moved api to legacy folder for integration in monolith"
git checkout master
git pull
git checkout -b import
git remote add api-local-repo ../api
git pull api-local-repo export --allow-unrelated-histories
git remote rm api-local-repo
After checking that everything is good, we need to push and eventually merge using the git browser UI
git push