I have a Git repository with two branches: master
and redesign
. The redesign
branch was created from master
, and master
has not been touched since then:
master
...|--m50--\
\--m51--|--m52--|--m53-- redesign
The redesign
branch has evolved so much that I would like to create a new whole repository from it, taking the first commit of redesign
as the initial commit of the new repository and forgetting the previous history inherited from master
:
master
...|--m50--
redesign
--r1--|--r2--|--r3--
Is this possible with Git? There is a related question to this, but its goal is to use a directory, not a branch.
Thanks!
You could:
.git
directory)redesign
branchgit format-patch master..redesign
Then go to your new directory and:
$ git init
$ git add . # make sure your .gitignore is in place though
$ git commit -m"..."
$ git am /path/to/patches/*.patch
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With