Skip to content
Michael Dietze edited this page Jul 10, 2014 · 2 revisions

Set up

  1. First fork pecan on github into your own github space (github help: "fork a repo") This allows you to create your own copy of the code. When you do the fork, a copy of the code is created and placed in your personal space. This is your personal copy: you can clone, branch and push things back here. If you have a branch or some code you want to merge back in the main branch, you make a pull request.

  2. Introduce yourself to GIT

     git config --global user.name "FULLNAME"
     git config --global user.email [email protected]
    
  3. If you are working from a cluster, you may need to set up ssh keys

  4. Clone to your local machine (substituting for your GitHub username). From the command line you would run:

     git clone [email protected]:<username>/PhenologyForecast.git
    

From within R Studio you would select File > New Project > Version Control > Git and then enter the URL

   http://github.com/<username>/PhenologyForecast.git
  1. Define upstream repository

     cd pecan
     git remote add upstream [email protected]/EcoForecast/PhenologyForecast.git 
    

Basic Workflow

  1. Get the latest code from the main repository

     git pull upstream master
    
  2. Do some coding

  3. Commit after each chunk of code

     git commit -m "some descriptive information about what was done"
    
  4. Push to YOUR Github (when a feature is working, a set of bugs are fixed, or you need to share progress with others)

     git push origin master
    
  5. Before submitting code back to the main repository, make sure that code runs

  6. From your fork of the project on GitHub.com, submit pull request with a reference to related issue (see Link commits to issue);

Clone this wiki locally