Deprecated: (6.186) preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /afs/athena.mit.edu/course/6/6.186/web_scripts/2013/w/includes/Sanitizer.php on line 1550

Deprecated: (6.186) preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /afs/athena.mit.edu/course/6/6.186/web_scripts/2013/w/includes/Sanitizer.php on line 1550

Deprecated: (6.186) preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /afs/athena.mit.edu/course/6/6.186/web_scripts/2013/w/includes/Sanitizer.php on line 1550

Deprecated: (6.186) preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /afs/athena.mit.edu/course/6/6.186/web_scripts/2013/w/includes/Sanitizer.php on line 1550
Git Documentation - Maslab 2013

Git Documentation

From Maslab 2013
(Difference between revisions)
Jump to: navigation, search
(Created page with "===Getting set up:=== The staff code is located on Github: https://github.com/gkanwar/maslab-staff-2013. Our recommended setup: :0. Make a Github account if you do not have one ...")
 
(Getting set up:)
Line 1: Line 1:
===Getting set up:===
+
===Getting set up===
  
 
The staff code is located on Github: https://github.com/gkanwar/maslab-staff-2013. Our recommended setup:
 
The staff code is located on Github: https://github.com/gkanwar/maslab-staff-2013. Our recommended setup:
Line 8: Line 8:
 
:4. Team members can then make local edits and push and pull from the Github repository.
 
:4. Team members can then make local edits and push and pull from the Github repository.
 
:5. Your netbook should also have a clone of this repository, so you can run the code on your robot.
 
:5. Your netbook should also have a clone of this repository, so you can run the code on your robot.
 +
 +
===Staying up-to-date with staff code===
 +
 +
We'll be updating the staff repository periodically, and it will most likely be to your advantage to keep your repository updated with any changes we make. Luckily, Git makes it easy to do so. In order to update your fork on Github, you'll need to have '''one''' team member do the following:
 +
:1. On your '''local''' repository, add the staff repostory as a remote by running '''git remote add staff git://github.com/gkanwar/maslab-staff-2013.git'''.
 +
:2. Run '''git pull staff master''', to pull the staff's master branch and merge it into your own. If you get conflicts, this means you edited staff code and will need to manually merge your changes in and make another commit.
 +
:3. Run '''git push origin master''', to push the updated master branch to your own fork on Github.
 +
:4. Your fork is now up to date, and your teammates can '''git pull''' to get their local repositories up to date.

Revision as of 05:43, 8 January 2013

Getting set up

The staff code is located on Github: https://github.com/gkanwar/maslab-staff-2013. Our recommended setup:

0. Make a Github account if you do not have one already. (Each team member should do this). You will probably want to set up SSH keys on your personal laptop also. See https://help.github.com/articles/generating-ssh-keys for more information.
1. One team member should go to https://github.com/gkanwar/maslab-staff-2013 and click 'Fork' in the top right. This will copy the staff code into your own personal Github repository.
2. This team member should then go to Settings > Collaborators and add every other team member.
3. Each team member can now clone the Git repository onto their local computer using the 'git clone' command.
4. Team members can then make local edits and push and pull from the Github repository.
5. Your netbook should also have a clone of this repository, so you can run the code on your robot.

Staying up-to-date with staff code

We'll be updating the staff repository periodically, and it will most likely be to your advantage to keep your repository updated with any changes we make. Luckily, Git makes it easy to do so. In order to update your fork on Github, you'll need to have one team member do the following:

1. On your local repository, add the staff repostory as a remote by running git remote add staff git://github.com/gkanwar/maslab-staff-2013.git.
2. Run git pull staff master, to pull the staff's master branch and merge it into your own. If you get conflicts, this means you edited staff code and will need to manually merge your changes in and make another commit.
3. Run git push origin master, to push the updated master branch to your own fork on Github.
4. Your fork is now up to date, and your teammates can git pull to get their local repositories up to date.
Personal tools