git: move previous commit from one branch to another

I’ve got this:

test/branch: with changes to files A, B several commits ago

and I want to move the updates to file A to:

this/branch

but not the updates from file B.

 

1. git log test/branch

2. git show <commit-id a>

3. I only want part of <commit-id a>so:

git cherry-pick -n <commit-id a>

 

 

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *