After cloning from remote git repository (at bettercodes) I made some changes, commited and tried to push:
git push origin master
Errors
I saw this error when trying to run git filter-branch
to detach many subdirectories into a new, separate repository (as in this answer).
I tried all of the above solutions and none of them worked. Eventually, I decided I didn't need to preserve my tags all that badly in the new branch and just ran:
git remote remove origin
git tag | xargs git tag -d
git gc --prune=now
git filter-branch --index-filter 'git rm --cached -qr --ignore-unmatch -- . && git reset -q $GIT_COMMIT -- apps/AAA/ libs/xxx' --prune-empty -- --all