JC, Adam, and Jesse's CS 147 repo.
First, you'll need to set up SSH access with GitHub. See https://help.github.com/articles/generating-ssh-keys for details.
$ git clone git@github.com:adamrothman/Cygnus.git
$ cd Cygnus
$ git submodule init
$ git submodule update
$ tools/install_git_hooks
Set Xcode to use spaces (the default), with 1 tab equal to 2 spaces (not the default). Keep a 1-1 correspondence between Xcode groups and folders in the filesystem. Opening brackets don't get their own lines. Try to keep line lengths reasonable.
Don't work in master. Seriously. Make a branch.
$ git fetch
$ git checkout -b my_feature_branch_name origin/master
This fetches the most recent changes and creates a new branch called my_feature_branch_name that tracks the master
branch on GitHub. When you git pull
, you will get the latest changes from master
.
Commit as you go. Keep messages brief, descriptive, and in present tense. Don't use git commit -a
; always check what you're committing with git status
before you pull the trigger.
$ git add file_i_changed.m another_file.h
$ git commit -m "Add some silly files"
If you know what you're doing, you can also use git add -A
. When you're done for the night, push your branch to GitHub for safe keeping. Check which branch you're on with git branch
before pushing (it's the one with the asterisk). Don't push to master
.
$ git push origin HEAD
You can switch between branches with git checkout branch_name
. Make sure your changes are committed first!
Create a pull request. Huzzah for code review! Read https://help.github.com/articles/using-pull-requests and follow the instructions. We are using the "shared repository model." Ask Adam if you have questions.