Abandon changes

Goal: You want to start fresh after failing to resolve conflicts or some other issue. If you intend to go nuclear, please contact the bioc-devel@bioconductor.org mailing list.

Force Bioconductor master to GitHub master

One way you can ignore your work and make a new branch is by replacing your local and GitHub repository master branch with the Bioconductor master branch.

Note: This works only if you haven’t pushed the change causing the issue to the Bioconductor repository.

Note: Any references to commits on current master (e.g., in GitHub issues) will be invalidated.


  1. Checkout a new branch, e.g., master_backup, with tracking set to track the Bioconductor master branch upstream/master.

     git checkout -b master_backup upstream/master
  2. Rename the branches you currently have on your local machine. First, rename master to master_deprecated. Second, rename master_backup to master. This process is called the classic Switcheroo.

     git branch -m master master_deprecated
     git branch -m master_backup master
  3. You will now have to “force push” the changes to your GitHub (origin) master branch.

     git push -f origin master
  4. (Optional) If you have commits on your master_deprecated branch that you would like ported on to your new master branch. Git has a special feature called cherry-pick

    Take a look at which commit you want to cherry-pick on to the new master branch, using git log master_deprecated, copy the correct commit id, and use:

     git cherry-pick <commit id>

    Push these cherry-picked changes to GitHub and Bioconductor repositories.

Reset to a previous commit

If you find yourself in a place where you want to abandon changes already committed to Bioconductor or GitHub, use reset to undo the commits on your local repository and push -f to force the changes to the remotes. Remember that the HEAD commit id is the most recent parent commit of the current state of your local repository.

git reset --hard <commit id>


git reset --hard e02e4d86812457fd9fdd43adae5761f5946fdfb3                                                        master
HEAD is now at e02e4d8 version bump by bioc core

To make the changes permanent, you will then need to push the changes to GitHub, and then email the Bioconductor core team to force push to the repository on Bioconductor.

## You

git push -f origin 

Bioconductor core team will do the rest after you email.

Delete your local copy and GitHub repo, because nothing is working

CAUTION: These instructions come with many disadvantages. You have been warned.


  1. Delete your local repository, e.g., rm -rf BiocGenerics

  2. Delete (or rename) your GitHub repository.

  3. Maintain GitHub and Bioconductor repositories for an existing Bioconductor repository, then pull upstream changes.

Disadvantages of going “nuclear”

  1. You will lose all your GitHub issues

  2. You will lose your custom collaborator settings in GitHub.

  3. You will lose any GitHub-specific changes.