git - How to add a sequence of commits to another branch? -


in git, how apply sequence of commits "d-e"

master       a-b                 \ py3-version      c-d-…-e 

back onto master, obtain

master       a-b - <d patch applied> - <…> - <e patch applied>                 \ py3-version      c-d-…-e 

i want because master python 2 version, c being python 3 version generated automatically (through 2to3), needed improve (d e). now, put improvements d e onto master branch (and forget c , py3-version, regenerated new master branch). how can done?

this called cherry-picking in git lingo, can import changes selectively 1 branch another:

git checkout master git cherry-pick py3-version~10..py3-version 

this pick last 10 commits "py3-version" branch.

in case of conflicts prompted manually resolve them. should continue cherry-picking git cherry-pick --continue (or git cherry-pick --abort, if went wrong).


Popular posts from this blog

How to calculate SNR of signals in MATLAB? -

c# - Attempting to upload to FTP: System.Net.WebException: System error -

ios - UISlider customization: how to properly add shadow to custom knob image -