Merge two branches without actually merging

This seems like a fairly common and direct requirement, but I studied transplant expansion, rebase, import, export, etc., and I still have to figure it out. Hope I'm missing something obvious.

I would like to β€œmerge” two branches (called branches to be specific) so that the branches themselves do not go away. Essentially, I want to extract the changes from the revision, but manually resolve cherrypick changes / conflicts (using my merge program).

It seems that import, export, transplantation, etc. generate patches and changes that are directly applied to the current working directory. But I do not want this ... instead, I want to manually determine what changes are coming in.

Appreciate your help.

+3
source share
3 answers

I would like to β€œmerge” two branches (called branches to be specific) so that the branches themselves do not go away.

This is the default behavior. For example, if you look at defaultthe mercurial source branch , you will see that it merges regularly with stable. These mergers do not lead to the disappearance of defaultor stable. Merge negotiation only gets the name of the local branch.

I want to manually determine what changes are coming in.

It seems to me that transplantation is already doing this. In addition, you can make each change to your own function branch, and then you have full control over which functions are combined in the branch.

: now there is also a graft command .

+4
source

, , , . ( Git) :

git cherry-pick SHA1 --no-commit
git add --patch

, / , SO GIT, / "" ? "

+2

If you use git, look at merge strategies .

0
source

Source: https://habr.com/ru/post/1788800/


All Articles