Answer the question
In order to leave comments, you need to log in
Merge branches in git, why is there no conflict?
Good afternoon! learning to use git. The question arose, in the master branch I write on the first line of the file 123.
I create a new test branch, switch to edit the first line to 456
Commit, switch to the master - there is 123 in the file, everything seems to be as it should. I do a git merge test and the system replaces the first line with 456, why is there no conflict?
Answer the question
In order to leave comments, you need to log in
because the test branch was created on the basis of the commit where this line already existed, and when the merge took place, there were no later commits affecting this line. And that means no conflicts.
If you want to get a conflict - after you commit the changes in the test branch, return to master, correct the same line, commit and then try to merge.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question