-
Notifications
You must be signed in to change notification settings - Fork 12
Using Git
-
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.
-
Introduce yourself to GIT
git config --global user.name "FULLNAME" git config --global user.email [email protected]
-
If you are working from a cluster, you may need to set up ssh keys
-
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
-
Define upstream repository
cd pecan git remote add upstream [email protected]/EcoForecast/PhenologyForecast.git
-
Get the latest code from the main repository
git pull upstream master
-
Do some coding
-
Commit after each chunk of code
git commit -m "some descriptive information about what was done"
-
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
-
Before submitting code back to the main repository, make sure that code runs
-
From your fork of the project on GitHub.com, submit pull request with a reference to related issue (see Link commits to issue);
- also see github documentation