How to resolve merge conflicts and when to use rebasing