Let’s say I have a file in the master branch:
Hello World!
I create a new branch A and modify that same file to:
Hello World!
and a little more
Then I modify that same file in the master branch
Hello World, the bug is fixed!
Is there a way to merge the 2 branches into:
Hello World, the bug is fixed!
and a little more
without having to resolve a conflict?
ps: completely new to git so I might miss something obvious – I’m using netbeans as an IDE and using the built-in merge function
Conflicts arise out of ambiguities and are sometimes unavoidable. Try using a tool like meld to help quickly resolve your merge-conflicts and make it a less painful experience.
I would also recommend that you first perform a rebase from your working branch to pull in the changes from master before attempting the merge. It is good practice to settle conflicts locally in your branch first so that you have trivial fast-forward merges.