I'm working in a team which is growing and making use of git. We are generally working in our own branches.
I pulled some changes from another workers repository. His changes eventually were added to and merged into a master branch with a squash commit.
When I tried to fetch from master and merge I got a load of conflicts. I am thinking this is because of the squash merge and the fact that it will confuse the merge tracking. Is there an easy way out of this?
Secondly. If developers are working on a number of branches and possibly needing each others changes before they go into master is there a way to handle this while continuing with the squash commits on master.
Rebase is mentioned a lot. But I don't see how this will work with more than one root branch?
Yes, squashing plays havoc with repeated merging. The best advice is don't squash - specifically, don't squash things that are public. Rewrite your own commits before you share them with others, but once they're shared, they should remain as they are, with regular merge commits.
You can still get reasonable log output by using git log --first-parent
to condense the log of a merged branch down to just the merge commit, while keeping the actual history intact.