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.
The following assumes you have your two separate new repos set up as remotes named
repo_v1andrepo_v2.The v1 branch is easy:
The v2 branch isn’t that hard:
(
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.)