I had a massive git repo because of a huge number of commits, so following advice here I created a shallow clone. I\'ve made changes to this new local repo, and now I want t
I will not agree with the accepted answer for 2 reasons:
Here are my suggestions:
You should have a $GIT_DIR/.git/shallow file with a graft point. If the history is simple enough, this graft point should allow you to push even though documentation says otherwise.
This allows you to keep commit history and etc:
git format-patch origin..master
Then clone the origin and reapply:
git clone origin_path
cp shallow_clone/*.patch deep_clone
cd deep_clone
git am *.patch
This time you can push !
git push