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 6159239
In Process

The Archive Base Latest Questions

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

I am using git for a large legacy project which has two branches –

  • 0

I am using git for a large legacy project which has two branches – v1.0 and v2.0. The source for each branch is very different in places, identical in others. When I make a bug fixes to the v1.0 branch I have to add them to the v2.0 branch using git cherry-pick as a git merge 1.0 would basically trash large parts of the v2.0 source.

However, new development has stopped on v1.0 and using git cherry-pick to copy fixes to the v2.0 branch is cumbersome. I would prefer to somehow be able to tell git that when I do a git merge from 1.0 -> 2.0 to only merge starting from a specific point in the 1.0 commit history (i.e. when new development stopped). Is this possible? It would allow me to make multiple fixes to the v1.0 source and merge the changes into v2.0 in one hit instead of using multiple cherry-picks.

  • 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-23T21:05:52+00:00Added an answer on May 23, 2026 at 9:05 pm

    From 2.0 branch execute

    git merge --strategy=ours v1.0
    

    I didn’t tested it myself so try it first on something not important, but from docs it is exactly what you need.

    From documentation:

    This resolves any number of heads, but the resulting tree of the merge
    is always that of the current branch head, effectively ignoring all
    changes from all other branches. It is meant to be used to supersede
    old development history of side branches. Note that this is different
    from the -Xours option to the recursive merge strategy.

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

Sidebar

Related Questions

I'm using Git on a new project that has two parallel -- but currently
I have been using git to keep two copies of my project in sync,
I am using git for windows to manage a local project. I have two
I've been using Git as a fat client for a Subversion repo, which has
We've seen and watched the videos on how large distributed teams are using Git,
I am using git on a project, that generates lots of data-files (simulation-results). I
I'm using git for a PHP project, I think it's really handy. There is
I've been using Git now for a couple of months on a project with
The web-application is a custom-built CMS which has several sub-applications and each one of
I'm trying to import a large subversion repository into git using git-svn (so that

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.