Cherry pick to specific branch from different branch patch in git

Cherry pick to specific branch from different branch patch in git ?

Let us see the steps to do the cherry pick to specific branch from different branch patch which is merged in upstream,

First clone the project from repo in corresponding branch you want to place the patch,

$ git clone ssh://<usermame>@<hot-name>:<port>/<project-repo> -b <branch>
$ cd <project-repo>

Check the default branch is the one we have used above using below command,

$ git branch

Add default git username to do the patch,

$ git config --global --add gitreview.username <gitusername>

Now cherry pick the patch from different branch to current branch local code,

$ git cherry-pick <commit-id>

Now no conflicts then no issues and directly you can place the patch using git review command.

Incase of conflicts, check out the files which are having conflicts and resolve all the files manually,

$ git status

Add the updated files using git add command,

// Resolve conflicts file manually which are not resolved automatically
//add any files which are having conflicts and reolved manually.
$ git add <updated-file1>,<updated-file2>,...

Run cherry-pick continue to proceed, do abort in case of cancel.

here used chery pick continue to proceed and place the cherry pick patch.

$ git cherry-pick --continue

this step optional, incase you dont want to check commit message,

$ git commit --amend

place the cherry pick patch in upstream,

git review



Python installation

Privacy Policy  |  Copyrightcopyright symbol2020 - All Rights Reserved.  |  Contact us   |  Report website issues in Github   |  Facebook page   |  Google+ page

Email Facebook Google LinkedIn Twitter
^