I made a shallow clone of a repository with git clone --depth=1. I made some changes... apparently without understanding the complications of shallow clones...
I would do it as follows:
Create a new root branch:
git checkout --orphan truncated_master
Populate its initial commit with the earliest available commit in your shallow repository:
START_COMMIT=$(git rev-list master|tail -n 1)
git checkout $START_COMMIT -- .
git commit -m "Initial commit"
Copy all commits from master to the new branch:
git cherry-pick $START_COMMIT..master
Push the new branch to the new remote:
git push origin truncated_master:master