Git output conflict results

I did git pull origin newbranch: newbranch ... but for some reason .. it tried to merge newbranch in my origin with the local host .. and this led to a conflict. 1) how do i cancel half did a merge? 2) how do I pull newbranch in origin to a new branch in a local repo named "newbranch"

+3
source share
1 answer

Use this to reset for your pre-merge:

git reset --merge

(Or, if you are using the git version before --merge, use --hard.)

Then create and test your branch and pull, merging with it:

git checkout -b newbranch
git pull origin newbranch

Of course, you will encounter the same conflicts as before, because you merge with the same fixation ...

+7
source

Source: https://habr.com/ru/post/1749023/


All Articles