We currently have a public vplanet
repo and a private vplanet-private
repo. Here's what we decided our workflow should look like:
All development is done on the (non-master
) branches of vplanet-private
and synced to master
via pull requests. When a change is ready to be incorporated into the current released version of the code, we go to our local clone of the public vplanet
repository and pull from master
on vplanet-private
to local dev
. Then, on the GitHub UI, we issue a pull request for master
on vplanet
.
1. Clone both repos:
git clone https://github.com/VirtualPlanetaryLaboratory/vplanet.git
git clone https://github.com/VirtualPlanetaryLaboratory/vplanet-private.git
2. Add a remote to vplanet
called private
. This is how we will pull from the private repo.
cd vplanet
git remote add private https://github.com/VirtualPlanetaryLaboratory/vplanet-private.git
git config --global merge.ours.driver true
3. Add a remote to vplanet-private
called public
. This is how we will pull from the public repo.
cd ../vplanet-private
git remote add public https://github.com/VirtualPlanetaryLaboratory/vplanet.git
git config --global merge.ours.driver true
1. Say you've made some changes on the private repo and you're ready to push them over to the public repo. Since the repos aren't forks of each other, we can't issue the pull request directly on the GitHub UI. Instead, we do this locally, by pulling from the private repo to the public dev
branch, then push it to GitHub:
cd vplanet
git checkout dev
git pull private master
git push origin dev
2. We can now create a pull request from dev
to master
via the GitHub UI:
1. Now say someone has issued a pull request for dev
on vplanet
(the public repo). Once that pull request is accepted, let's go into the private repo and pull over the changes to the dev
branch on vplanet-private
:
cd vplanet-private
git checkout dev
git pull public dev
git push origin dev
2. We can now create a pull request from dev
to master
via the GitHub UI:
Suggested merge scripts for public/private changes
vplanet/merge-from-public.sh
vplanet-private/merge-from-private.sh