Maintain a Bioconductor-only repository for an existing package

Goal: Developer wishes to maintain their Bioconductor repository without using GitHub.


Clone and setup the package on your local machine.

  1. Make sure that you have SSH access to the Bioconductor repository; be sure to submit your SSH public key or github id to Bioconductor.

  2. Clone the package to your local machine,

     git clone<ExamplePackage>

    NOTE: If you clone with https you will NOT get read+write access.

  3. View existing remotes

     git remote -v

    which will display

     origin<ExamplePackage>.git (fetch)
     origin<ExamplePackage>.git (push)

    This indicates that your git repository has only one remote origin, which is the Bioconductor repository.

  4. In other work flows, the origin remote has been renamed to upstream. It may be convenient to make this change to your own repository

     git remote rename origin upstream

    and confirm that git remote -v now associates the upstream repository name with

Commit changes to your local repository

  1. Before making changes to your repository, make sure to pull changes or updates from the Bioconductor repository. This is needed to avoid conflicts.

     git pull
  2. Make the required changes, then add and commit your changes to your master branch.

     git add <files changed>
     git commit -m "My informative commit message"
  3. (Alternative) If the changes are non-trivial, create a new branch where you can easily abandon any false starts. Merge the final version onto master

     git checkout -b feature-my-feature
     ## add and commit to this branch. When the change is complete...
     git checkout master
     git merge feature-my-feature

Push your local commits to the Bioconductor repository

  1. Push your commits to the Bioconductor repository to make them available to the user community.

    Push changes to the master branch using:

     git checkout master
     git push upstream master

(Optional) Merge changes to the current release branch

  1. If the changes (bug fixes) need to be available on the <RELEASE_X_Y> branch. Checkout the branch <RELEASE_X_Y> using:

     git checkout -b <RELEASE_X_Y> upstream/<RELEASE_X_Y>
  2. Pull any changes from the Bioconductor repository to this branch

     git pull
  3. Then, merge master into the <RELEASE_X_Y> branch

    git merge master

A new commit message will show up after this step, with the message Merge branch 'master' into <RELEASE_X_Y>. It will be committed to <RELEASE_X_Y> branch when you save. Update the version number so that it is correct for the release, and commit the modified DESCRIPTION file

git commit -m "Update version bump"
  1. Push changes to the <RELEASE_X_Y> branch using:

     git push upstream <RELEASE_X_Y>