Problems using git merge

I am new to git. Just a few minutes ago, I merged on two branches; call them A and B. I was 'on' with branch A; my next command was "git merge B". It said that there was one conflict, but I looked in the file, and there were no conflict markers. I added the file, committed the change, and ran the merge command again. "Already updated" is the message I receive.

However, no merger seems to have happened. Both branches still exist, and both are exactly the same as before the merge.

What did I do wrong? And how can I combine these two branches?

Thanks.

+3
source share
2 answers

, , .

, Git ( ), , . , Git , () , , , , CONFLICT (delete/modify), .

, . " " - , .

, . Git , .

, :

git reset --hard HEAD^
git merge B

, , : (git reflog) , .

+2

, , , B. ( Git)

, , ​​ , .

" " , B A.
, B A. (gitk )

A, A , .

+1

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


All Articles