As an example: suppose you have a personal project like Angular Seed (which is a starting point for an Angular project https://github.com/angular/angular-seed).
Now you want to use that as a starting point for a project (say an online photo album).
You shouldn't just create a branch because you're not making a variation of the seed project. But github won't let you fork it if it's your own repo.
So what is the workflow to create a clone that can still pull in changes form the original seed project? I thought that was a fork.
I just found this answer https://stackoverflow.com/a/4096529/131227 as well as a comment (git workflow - using one repo as the basis for another) which together lead me to a solution I like.
git clone -o boilerplate ssh://[email protected]/user/proj.git new_proj
The -o boilerplate renames the origin to boilerplate
which can still be used to pull changes from.
Create your new empty github new_proj repo.
Thengit remote add origin ssh://[email protected]/user/new_proj.git
I think the right answer here is to use something like Yeoman Generators. (http://yeoman.io/) You want to use the git repo with your seed project as a generator. It wouldn't allow you to continually pull in changes from the seed project though.
The solution of using two remotes works, but eventually the projects will diverge enough that will make keeping those projects in synch very difficult.
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