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

后端 未结 16 2302
轻奢々
轻奢々 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:20

    This happened to me when my SourceTree application crashed during staging. And on the command line, it seemed like the previous git add had been corrupted. If this is the case, try:

    git init
    git add -A
    git commit -m 'Fix bad repo'
    git push
    

    On the last command, you might need to set the branch.

    git push --all origin master
    

    Bear in mind that this is enough if you haven't done any branching or any of that sort. In that case, make sure you push to the correct branch like git push origin develop.

提交回复
热议问题