I\'m trying to update a Git repository on GitHub. I made a bunch of changes, added them, committed then attempted to do a git push. The response tells me that e
In my case, I had to delete all remotes (there were multiple for some unexplained reason), add the remote again, and commit with -f.
$ git remote
origin
upstream
$ git remote remove upstream
$ git remote remove origin
$ git remote add origin
$ git push -u -f origin main
I don't know if the -u flag contributed anything, but it doesn't hurt either.