Git Merge Commits From One Branch Into Another

Written by James McDonald

November 11, 2021

I created a feature in my Toggen WMS to be able to print an SSCC Label PDF from MessageXchange XML the branch in git was xmltopdf

Later I fetched the production “live” code back to my development repo and changed a label print page to have 3 print forms instead of 2. The branch was named threePrintForm

So my goal was to merge the changes from the threePrintForm commits back into my xmltopdf branch

So do that:

# change to my development branch
git checkout xmltopdf

# view all commit logs from all branches and find the commits that had me adding the feature to the production branch
git log --all 

# this commit Added a 3rd Print Form
git check-pick bc795ddfc293cd8d1a3cfb902454b810fb31fb97

# this commit fixed the layout of the forms on the page.
git cherry-pick 95440ab3daed7b08f3f56bb4ad5257237aa531a1


Cherry Pick: choose and take only (the most beneficial or profitable items, opportunities, etc.) from what is available.

0 Comments

Submit a Comment

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

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

The reCAPTCHA verification period has expired. Please reload the page.

You May Also Like…

Ubuntu on Hyper-v

It boils town to installing linux-azure # as root or sudo apt-get update apt-get install linux-azure...