"Saving" with the remote wizard when working with a long-term local topic branch

I have been working on a local partition branch for some time, making a few changes from time to time.

At the same time, the master branch has changed significantly. I decided to include new changes in the master branch in my branch of local themes (which practically do not have any changes with respect to the original command latch, from which I separated):

git fetch git checkout my_branch git merge origin/master 

but then git warns me:

Please enter a commit message to explain why this merge is necessary, especially if it merges the updated upstream into a topic branch.

I was curious. Why a warning? Should I rebase instead ? or cherry pick ? And besides this, how can I use reinstallation or cherry pick in my case?

+8
git version-control
source share
1 answer

There was some discussion of the wording of this exact message using git core maintainer, because you are right, this is not very clear.

Puppet lab programming guides provide a great explanation of why this is suboptimal and provide a more preferable workaround:

Work should be done on topic branches and combined using no-ff. The reason for this is because the history of git is much clearer. A branch-related group of topic branches makes excellent comments and merging using no-ff keeps this grouping in history.

Do not merge a branch upstream into your branch so that it can be avoided. Although this is one way to resolve conflicts between your development and development in an upstream branch, it leads to an unclean history - and especially to code changes in merge transactions that are difficult to work with.

We would prefer that you cancel your branch against the upstream, so we won’t end this mess if you need to adapt to external changes.

Puppet labs

+6
source share

All Articles