I was facing a similar situation and came across this solution for cloning completed separated projects you listed. With some simple editions, you can send branches across repositories and sync them manually thru pull requests.
I already had the cloned repository from the original, but if you don't have it, follow @larsks answer to clone and create a copy of the repo:
$ git clone [email protected]:org/myrepo-original myrepo-new
$ cd myrepo-new
$ git remote set-url origin [email protected]:org/myrepo-new
$ git push origin master
After doing that, go back to the directory containing the original repository (the one where origin
still points to [email protected]:org/myrepo-original used in the example) and add a remote pointing to the cloned using the command:
$ git remote add cloned [email protected]:org/myrepo-new
Your original repo should look like this now:
$ git remote -v
origin [email protected]:org/myrepo-original (fetch)
origin [email protected]:org/myrepo-original (push)
cloned [email protected]:org/myrepo-new (fetch)
cloned [email protected]:org/myrepo-new (push)
After this, you can push
branches containing the stuff you want to the cloned
repo and create pull requests to better visualize the contents and merges.
Let's say you want to update the master
from the cloned repository with the master
from original one:
$ cd myrepo-original
$ git checkout master
$ git checkout -b master-original
$ git push cloned master-original
And from myrepo-new
on the GitHub interface create the PR using the base as master
and compare as master-original
.
Note: Although I think this would solve your problem, I would recommend based on the Further background you provided to research the possibility and turn your core/template repo on a submodule. In my opinion this makes it easier to update the core application between repos instead of "sending" branches cross repositories. =)