civic-commons / opencivic

A Drupal distro for app catalogs and hackathons
https://drupal.org/project/opencivic
16 stars 2 forks source link

Git branching for Drupal.org and Github #54

Open sheldonrampton opened 11 years ago

sheldonrampton commented 11 years ago

Aaron, I've pushed the Apps Catalog distro to Drupal.org. In the process of doing so, I encountered an issue/question regarding how our Github repo and the Drupal.org repos should relate to one another. I think I've come up with an approach that should work, but it involves doing some things with git that are a bit outside my regular experience, so I want to run this by you and see if you think it makes sense.

Eventually I'll want the distro to live entirely on Drupal.org, but since we are currently using Github for issue tracking with the client as well as with Nuams team members, I want to continue using Github for source code version control for the time being, while regularly pushing updates to the repo on Drupal.org.

I've therefore set up my local git clone of the repo so it has two remotes, as follows:

Remote URL
github https://github.com/nuams/apps_catalog.git
drupal sheldon@git.drupal.org:project/apps_catalog.git

I've also created two branches: master and 7.x-1.x. After creating the 7.x-1.x branch, I pushed a commit to that branch changing file "distro.make" so its download URL is http://git.drupal.org/project/apps_catalog.git instead of https://github.com/nuams/apps_catalog.git . I did not push this change to the master branch. This means that any subsequent changes which I make to "master" can be pushed to Github using "git push github master". This will trigger a rebuild of the demo website you've set up at http://apps-cat.nuamsdev.com/ based on the master branch on Github, but people who retrieve the website from Drupal.org will get a distro based on the 7.x-1.x branch on Drupal.org.

People other than myself who are working on the Github repo can therefore continue to push their changes as they have been, using git push to master. I'll use "git pull github master" to pull everyone's commits into my copy of the master branch. Periodically I'll merge changes from the master branch into 7.x-1.x and then push those changes to Drupal.org using "git push drupal master".

At some point I think we'll stop using the Github repo entirely. At that point I'll update file "distro.make" in the "master" branch so its download URL is http://git.drupal.org/project/apps_catalog.git, as is already the case for the 7.x-1.x branch.

Does that make sense to you?