Theo Pepler

Home | Research | Teaching | Software | Links | HOWTO's

HOWTO: CREATE GITHUB REPOSITORIES FOR R PACKAGES

  1. Create a local git repository in RStudio (as an R package).
  2. Create a new git repository on github.com, such as tpepler/cpc.
  3. In the terminal, change to the directory where the local repository is and use the following commands (adapted for your GitHub username and repository name):

    git init
    git remote add origin https://github.com/tpepler/cpc
    git fetch --all
    git add --all
    git commit -m 'Initial commit'
    git push -u origin master


  4. You will be prompted for your GitHub username and password. Once these details are entered, the upload of the local repository to the GitHub server will begin.