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

  • Home
  • SEARCH
  • 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 3630494
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T00:16:37+00:00 2026-05-19T00:16:37+00:00

Is there a way to update a side branch with information from another (master

  • 0

Is there a way to update a side branch with information from another (master or other), and then have the two continue? Like a rebase, but keeping the old data there?

Original:

A---B---C---G---H  master
     \           
      D---E---F  branchA

Result:

A---B---C---G---H---L  master
     \           \
      D---E---F---J---K  branchA

Such that branchA gets the information from commits C, G, and H, (Commit J is that merge) such that commit K is still a side branch (and future commit L is still on master), but has the updated information from master?

I don’t want to do a rebase, because that would end up with:

A---B---C---G---H---L  master
                 \
                  D'---E'---F'---K  branchA

Creating “new versions” of D, E, and F as if they happened on top of H instead of B, and the issue is that commits C and E is the renaming of a key folder in the repo, and I want to collapse them together, without merging the other feature updates from branchA just yet. Rebasing means H uses the new folder name, D’ creates the old folder name, and E’ removes it again, which isn’t the most clean.

The point is I want to get that folder rename (C and E) in the past and stop bringing it forward. Does that makes sense? Am I looking at this backward? Or should I just deal with the messy rebase “name, rename” trick until the branch gets merged?

  • 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-19T00:16:38+00:00Added an answer on May 19, 2026 at 12:16 am

    If your history goes up to H or L on master and F on branchA (that is, J and K do not yet exist), then yes, simply check out branch A and merge:

    git checkout branchA
    git merge H   # Use H's commit identifier if it's not the tip of master
    

    This will merge the changes into branchA and will not disturb the master branch at all.

    If you have already created commit K and you want to insert a merge between it and F, then there’s a bit more work to do:

    git checkout -b temp F   # Create a new branch at commit F
    git merge H              # Merge from commit H into the new branch
    git cherry-pick K        # Apply the K commit to the merged commit
    
    # And the rest simply replaces the temp branch with branchA
    git checkout branchA
    git reset --hard temp
    git branch -d temp
    

    In both cases, if you later merge in either direction, commit H will be the nearest common ancestor of both history branches, and so future merges will not look past this commit (or past J to F either) when deciding how to merge.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there a way to update information in a div of a parent page
Is there a way to update more than one Database having same schema using
Is there any way to force an update of software using RunOnce, without having
Is there a way to tell subversion update/merge unless it would cause a conflict?
Is there a way to detect when an update panel is done refreshing? I
Is there a way to exclude all svn externals when doing a recursive update?
In sql server 2005 , inside an update trigger is there a way to
update: I know there is no one best way to do everything. Sorry for
Is there way in next piece of code to only get the first record?
is there way thats i can preselect an item when the page loads or

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.