How Can I Selectively Merge Changes Between Two Branches While Retaining Both? #23266
-
I am in the midst of a major refactor of a collection of scripts, which have to remain active and functional while I perform the refactor (which will take quite a while). I’ve split off a new branch to perform the refactor, but…
I’m somewhat familiar with the process of merging a branch back into master once I’m finished and ready to apply all of the changes, but how can I merge changes selectively between two branches as described above? (I’m using Visual Studio Code and a few GitHub extensions to manage my repository, in case that happens to be relevant.) Thanks in advance for any help you can provide! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
If you want to apply individual commits from one branch to another (either way around) you can do that with git cherry-pick. Note that cherry-pick does not merge, it applies an existing change to another branch. Otherwise there are two things that might be helpful:
|
Beta Was this translation helpful? Give feedback.
If you want to apply individual commits from one branch to another (either way around) you can do that with git cherry-pick. Note that cherry-pick does not merge, it applies an existing change to another branch.
Otherwise there are two things that might be helpful: