Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 936947
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T21:23:43+00:00 2026-05-15T21:23:43+00:00

If I have a public Git repository that contains 3 branches like the following:

  • 0

If I have a public Git repository that contains 3 branches like the following:

  (release-to-customerA)
      |
      U               (master)
     /                    |
A---B---C---D---E ... S---T 
        |
    (release-to-customerB)

where commit ‘B’ was the original release version and commit ‘U’ resolved some bugs in ‘B’. I want to apply the commit ‘U’ to both master and release-to-customerB branch, and when the next time I deliver a new release to the customers based on the commit ‘D’, ‘E’, … ‘T’, I want the commit ‘U’ included. What is the cleanest way to do it?

I know that git rebase or git cherry-pick may do the trick in my local repository, but will I screw up the history when I submit the rebased work to the public repository?

Thanks for the answers.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T21:23:44+00:00Added an answer on May 15, 2026 at 9:23 pm

    Though cherry-picking will work, I’m not sure why you’d want to. It creates duplicate commits, which can cause problems if you ever want to merge. Indeed, this appears to be a case where you want to merge!

      (bugfixB, releaseA)
            --------------------- Y (master)
           /                     /
          U---X (releaseB)      /
         /   /                 /
    A---B---C---D---E ... S---T
    

    Note that I added a branch name bugfixB – this is a very general idea. The commit U should be made on a branch whose purpose is to fix B (it could be several commits). That branch should then be merged into all branches which need the bugfix – in this case, releaseA, releaseB, and master.

     git checkout -b bugfixB <SHA1 of B>
     # fix things, add changes
     git commit
    
     # for each branch...
     git checkout releaseA
     git merge bugfixB
     git checkout releaseB
     git merge bugfixB
     git checkout master
     git merge bugfixB
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a commit on a public repository. I would like this commit to
I have configured git so that I can push my local dev-repository to my
I have a GIT repository that I manage for my office. Because of company
I have a git repository. I want to create a branch for release snapshots.
I am new to git and github. Suppose I have a public github repository,
I have a github-based git repository that represents development up to a certain point,
I have public and private keys in separate .pem files that I would need
If you delete a public git repository, and then replace it with a different
I have a git repository on Unfuddle , and a Windows machine I'm using
I've recently setup an inhouse git repository server and have it up and running

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.