GIT - noduslabs/un1v3r53 GitHub Wiki
I want now to separate that branch into a separate project, which could be synchronized with the original project, so when I make some changes in the original project, i could also pull them to the new branch (but not the other way round).
-
Create a new project in GitHub
-
In your existing project, check out the branch of interest.
git checkout mybranch
-
Push it into the
master
branch of your new project:git push [email protected]:username/project.git mybranch:master
Now the master
branch of your new project contains the history of mybranch
in your exist project.
To keep the new repository in sync:
-
Add it as a new "remote" to your existing repository:
git remote add otherproject [email protected]:username/project.git
-
When you make changes to
mybranch
, push them to themaster
branch ofotherproject
:git push otherproject mybranch:master