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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T15:49:08+00:00 2026-06-05T15:49:08+00:00

I have the following git tree : branch v2 => / — [lots of

  • 0

I have the following git tree :

branch v2 =>                    / --- [lots of work] --- [new version] --- ref_d
                               /
  root --- ref_a --- ... --- ref_b (project reset)
             \
branch v1 =>  \ --- [some works] --- ref_c

As v1 and v2 are really different, two different team will maintain v1 and v2, I would like two separate branch two to different git repository as :

repo_v1 : from root to ref_c
repo_v2 : from ref_b to ref_d

How should I do this ?
Thanks.

  • 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-06-05T15:49:09+00:00Added an answer on June 5, 2026 at 3:49 pm

    The following assumes you have your two separate new repos set up as remotes named repo_v1 and repo_v2.

    The v1 branch is easy:

    git push repo_v1 ref_c:v1
    

    The v2 branch isn’t that hard:

    git checkout --orphan v2 ref_b
    git cherry-pick ref_b..ref_d
    git push repo_v2 v2
    

    (git checkout --orphan <branchname> <startpoint> creates an entirely new history that starts from the specified point but doesn’t have any of that commit’s parents.)

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

Sidebar

Related Questions

I have following working tree state $ git status foo/bar.txt # On branch master
git version 1.7.3.5 I have the following branches: git branch image master * video
I have the following tree: O---O---O---O <- master \--O---O <- work branch /\ ||
In my current repo I have the following output: $ git branch -a *
I have the following directory structure: project/ .git/ ... app/ ... config/ initializers/ braintree.rb
I have the following Git commits tree: R - A - B - C
I have a git tree that looks like the following: Because of the review
I have created the following git hook to update my web application when new
I would like to have the following setup to work with git: for a
Suppose I have the following git commits: aaaaaa bbbbbb cccccc (the latest) I would

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.