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

后端 未结 12 1759
轻奢々
轻奢々 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:53

    This is what worked for me. It can be found in git documentation here

    If you are on your desired branch you can do this:

    git fetch origin
    # Fetches updates made to an online repository
    git merge origin YOUR_BRANCH_NAME
    # Merges updates made online with your local work
    

提交回复
热议问题