Is it safe in Git to pre-merge master into my feature branch before final merge?
While developing a feature branch locally, it turned out the feature needs huge changes. In order to minimize the amount of work and stress during the merge, I thought of first merging locally master into my branch, resolve all conflicts, and then merge my feature into master – which should then be a fast forward, easy merge.
Does this merge expose any risk of losing someone’s changes? Do you recommend another approach?
I typically rebase the features on top of master, this makes it easier for the person who needs to merge them. However no matter in what direction you do it – even when you get no merge conflicts you still need to test it. You can never asume it is safe.
Answered By – eckes