-
Notifications
You must be signed in to change notification settings - Fork 11
The Contributor's How to Guide
If you are on Windows open up the git bash, everyone else grab a terminal. Remember, commit early and often and always check your work before committing. Check everything again before pushing to github!
-
Check for changes upstream:
cd /path/to/Observatory git pull origin
-
Make sure you are on the right branch, you probably want the dev branch:
git branch > * master > def git checkout dev
-
Make whatever changes you want to any files you need to.
-
Git can tell you what branch you are on and what you have done at any time:
git status
-
Test out your changes using
make test
:cd Observatory make test Lots of random output #Check it out in your browser @ localhost:8000
-
Checkout the right branch, add your changes, and commit:
git checkout dev git add path/to/file1 path/to/file2 path/to/file3 git status #Review what you are committing git commit -m "Your message here. Be descriptive"
-
Check everything again, if you push something broken, its hard to fix
-
Push your changes up to github:
git push
-
Check github for your changes!
http://github.com/rcos/Observatory/commits/<branchname>
-
Repeat as necessary
Github has a pretty nice and simple help page for this if you view the pull
request and click the Merge Help
button.
In general there are 3 steps
-
Add a new remote location for their repository:
git remote add bamnet-observatory https://github.com/bamnet/Observatory.git
-
Grab and review their changes on a new branch:
git checkout -b bamnet dev git pull bamnet-observatory dev cd observatory make test
-
If everything checks out, merge the changes and push:
git checkout dev git pull bamnet-observatory dev git pull #check for changes in origin git push #push the new commits
-
Add a new tag pointing at the commit you want to deploy:
git tag v1 v2 ... v8 git tag -a v9
-
Do the deploy:
make deploy password:
-
Enter the deploy password:
password:
-
Wait for it to finish:
Notice: Finished catalog run in 322.91 seconds Connection to rcos.rpi.edu closed.
- Read about how south does database migrations
- Create the database migration file
- Do the normal deploy steps
Cygwin users could potentially have trouble getting started with github. Follow their directions for setting up your account and keep the following things in mind:
- You want to use the
cygwin/home/<user>/.ssh
folder for your ssh files - If you get
ssh [email protected] Error PTY allocation request failed on channel 0
try it with a-T
flag which should (probably) make it go away.