/githubCribsheet

Notes and tips for using github with Biocondcutor

Notes and tips for using github with Biocondcutor

Every bioc/fhcrc project (including this one, the githubCribsheet) is a separate repository maintained under

https://github.com/Bioconductor

Create your own project (aka repository, or 'repo'):

  • Register as a user: https://github.com/signup/free
  • Send an email to pshannon AT fhcrc.org so that I can give you permissions to create your repo under Bioconductor.
  • Go to https://github.com/Bioconductor. Sign in.
  • Create your new repo by clicking on the leftmost of the three buttons you will find at the top right corner of the page. It has a '+' on it.
  • This takes you to a new page where you will be asked to name your project.
  • On this same page you can edit your repo's README.md which (like this file you are currently reading) records the central documentation for your project.
  • Save your changes to README.md by clicking on the Commit Changes button found at the bottom right corner of the page.

Setup your computer for git

  • git config --global user.name "your.github.account.name"
  • git config --global user.email "you@place.com"
  • configure the credential.helper. Alas, this step differs by operating system because passwords are saved in different ways on osx, linux and windows. Please get the right instructions for your computer at https://help.github.com/articles/set-up-git

Clone the project onto your own computer

Using SSH keys

Overview of basic operations

  • Making changes to your working copy propagate them to BOTH of your repos:
    • Add some text to REAMDE.md, whose contents you originall created at the github website
    • git diff README.md will report differences between your local repo and your working copy
    • update the local repo:
      git commit -m "added one line, modifying my local working copy" README.md
    • update github: git push
    • make sure your local repo and working copy have a record of the update you just did to the github repo: git pull

Add a user to your project

  • The new user needs a github login id
  • From the project home page, click the Admin button
  • Click the Teams button
  • Click the Owners button
  • Enter the new user's github id