Skip to content

Instantly share code, notes, and snippets.

@khoran

khoran/README Secret

Last active April 15, 2020 00:36
Show Gist options
  • Save khoran/74fa5a5506a23a8504390ba3f0941597 to your computer and use it in GitHub Desktop.
Save khoran/74fa5a5506a23a8504390ba3f0941597 to your computer and use it in GitHub Desktop.
bioconductor git workflow
a general workflow for bioconductor git/svn repos.
General development should be done in the master branch or on feature branches that then get merged into the master branch.
Here is an example. Suppose we want to add feature "foo" and we are currently on the master branch.
1) git checkout -b foo #create a new branch named "foo" and switch to it.
2) <do work>
3) git commit -a -m 'commit message' # commit changes. This can be done any number of times
4) git checkout master #when feature is done, switch back to master branch to prepare for merge
5) get merge foo # merge the branch "foo" into the master branch
Now we are back where we started and can add another feature. If a feature is small enough, it can be done right on the master
branch in which case just a "commit" is required.
At any point, the master branch and any features branches can be "pushed" up to github without affecting bioconductor. This can
be useful to allow further work on a different computer or just to save changes offisite.
When one wants to deploy to bioconductor, use the following proceedure:
1) Choose branch. "devel" for a development release, and "release-x.y" for an existing release branch (where x.y is the version you want).
We will use the example of "devel" here.
2) git checkout devel #make the target branch your current branch.
3) git svn rebase #pull in any remote changes from bioconductor side.
4) git merge master #merge your local changes from master into this branch.
5) git svn dcommit --add-author-from # push changes to bioconductor subversion repo.
All these steps could be put into a script, perhaps one that takes the target branch as an argument (ie, devel, release-x.y, etc.).
Most of the time these steps complete with out issue, but any one of them could require manual intervention at some point,
so it is important to understand what is going on behind the scenes so you can fix it and pick up where it left off.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment