There’s something I try to do and it always comes down to having to merge different branches manually by resolving conflicts.
The basic kind that always works, is if there is only a single developer working on a branch and then committing the changes,
The problem is – If i have two developers working on different files, how would i merge this two distinct branches into the master branch ? Always when i try i get weird errors from git about fast-forward and such.
I hope my question is clear enough 🙂
Thanks!
First, it may help to post the git output to diagnose the problem more accurately. Assuming your master branch doesn’t have any problems or uncommitted files i.e. if you run
git statuson your master branch you get this:If that is the case you can do a couple of things. You can do:
This will most likely use Octopus merge to merge everything into master or you can do it separately if you prefer:
This way it will try to fast-forward first. If you still get conflicts then I would post the output here. Also as a general rule, it’s a good idea to
git merge masterwhile on your working branch (branch1 or branch2) periodically if you’re working on a long project to make sure you take care of the conflicts as they happen, although it may be less important with only two developers.