Git push failed, “Non-fast forward updates were rejected”

后端 未结 12 1736
轻奢々
轻奢々 2020-12-02 06:12

I\'ve edited my GIT repositories via Git Online. After I tried to push my local code changes, I got an error:

Git push failed, To prevent from losing histor         


        
12条回答
  •  伪装坚强ぢ
    2020-12-02 06:56

    (One) Solution for Netbeans 7.1: Try a pull. This will probably also fail. Now have a look into the logs (they are usually shown now in the IDE). There's one/more line saying:

    "Pull failed due to this file:"

    Search that file, delete it (make a backup before). Usually it's a .gitignore file, so you will not delete code. Redo the push. Everything should work fine now.

提交回复
热议问题