Git push won't do anything (everything up-to-date)

后端 未结 16 2344
轻奢々
轻奢々 2020-12-04 05:38

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

16条回答
  •  生来不讨喜
    2020-12-04 06:21

    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.

提交回复
热议问题