If you need to: create an account in github and learn the basics with the basic github resources, tryGit and a cheat sheet.
Github provides free account upgrades to students and anyone working at a educational/research institute, which allow you to have your own private repositories. To get this upgrade, once you have a personal account, go to this page and fill in the form: https://education.github.com/discount_requests/new
The recommended steps to contribute to OuterRim are:
- Fork and clone: Get a copy of OuterRim from the GitHub repository
- Update your personal copy
- Track upstream: keeping your copy up-to-date with the main one
- Steps to follow when working on a new (big) feature: Branch, Contribute, Commit, (Merge) and Push.
- Submit a Pull Request to the main OuterRim code.
Once you have your GitHub account and are familiar with the basic git vocabulary, create your own OuterRim copy:
-
Go to https://github.com/viogp/firefly_doc or https://github.com/viogp/outerrim_mocks
-
Click 'Fork' there (right upper corner).
The next step is to get your copy of OuterRim into your machine (e.g Sciama):
-
Go to your home directory in your machine.
-
Clone there your repository. From your OWN local repository (outerrim_mocks at your Sciama home):
> git clone https://[username]@github.com/[username]/outerrim_mocks
You'll be prompt for your GitHub username and password.
Ensure that the remote is the correct one:
> git remote -v
If you need to reset the remote link:
> git remote set-url origin https://[git username]@github.com/[git username]/outerrim_mocks
Update your personal copy:
> git push origin master
This instructions follow the recommendations on syncing a fork from GitHub. To make sure that your version remains up to date with the master version, set the upstream tracking:
> git remote add --track master upstream https://[username]@github.com/viogp/firefly_doc
Now, every time you need to apply the changes that have been made to the master version to yours, navigate to your OuterRim directory and run:
> git fetch upstream
> git merge upstream/master
To start working on new feature, create a separate feature branch:
git checkout -b feature
You can check the branches you have by:
git branch
And switch between them with:
git checkout master
git checkout feature
Once some changes have been made in the branch, stage them and commit:
git add .
git commit -m "Add a comment here"
You can push changes with:
git push origin feature
Alternatively, you can merge the changes with the master branch first, and then push:
git checkout master
git merge feature
git push origin master
When you are ready to update the main OuterRim code, go to your GitHub OuterRim page, click "New pull request" to create a Pull Request from your latest commit. It will be applied by someone with administrator master version rights after review.