简体   繁体   中英

Conflicts in branches

I have a problem with the sourcetree try to upload the changes tells me that there are conflicts.

I have tried to delete the branches and create again I have done fetch and pull but it is blocked and the error persists.

I have looked on the internet and they tell me to do git reset HEAD --hard , but I have not tried it because I do not want to load anything.

You could confirm me if you see any problem before proceeding with the command.

This program don't permit to actualize the changes, only see the 25 conflicts. I need take the changes and add my changes. What can I do?

Conflicts in git are not errors.

When a conflict arises, it's git telling you "I'm facing things I can't automate, please explicitly tell me what to do".

Take a look at one of the many tutorials out there about conflict resolution in git, there are tons. (maybe start here ?)

If you are in Merge state

use command git reset --merge

Resolve the conflicts

  • Only keep the code you want and delete unwanted code.

    (find <<<<<<< HEAD )

After that try to push code using git push

Tip: You can try using VSCode. It has a great GUI for Git

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