简体   繁体   中英

Diverged Branches in GitHub

I tried to sync my local repository with the remote one on the GitHub site, but I keep getting an error. However, I don't really know how to fix it.

Can someone help me figure out what's going on? I'm new to using GitHub, and it doesn't make much sense to me.

Here's a picture of the problem:

There were changes to your branch on the remote repo. Did you try to pull , merge , or rebase the changes to your branch on the remote? Any one of those operations would generate the merge conflicts that you're seeing.

If you actually wanted to pull , merge , or rebase the new changes from the remote into your local branch, then all you have to do is fix the merge conflicts, then push.

Why do you have changes on the remote? Are you sharing your branch with someone else, and they pushed new changes there? Or did you amend or rebase your existing commits locally? If you did, that would cause conflicts with any code that you've already pushed to your remote as well.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM