Skip to content
Doug Salvati edited this page Aug 16, 2017 · 2 revisions

The code for the live (production) version of our site is located on GitHub in the master branch of the isenseDev/rSENSE repository. Each developer has their own copy (fork) at username/rSENSE. Additionally, you have a local copy (clone) of your repository in the rSENSE directory on your machine.

Taking on a new Issue

If you are assigned an issue, first find its ID on the issues page. Then, you will create a branch named your-initials + ID, for instance aa1234. This allows you to make changes in a safe space without affecting master or breaking things.

git checkout -b aa1234

At any time, you can list all branches with git branch or delete a branch by going to master and running git branch -D

Daily Workflow

You want to keep your master up-to-date with isenseDev/rSENSE's master. So, at the beginning of each programming session, follow the following steps:

  1. Enter your rSENSE fork.

cd rSENSE

  1. Pull changes from isenseDev/rSENSE.

git fetch upstream

  1. Merge these changes into your current branch.

git merge upstream/master

  1. If your current branch is not master, switch to master and merge there too, since this is always your starting point for new bugs.

git checkout master

git merge upstream/master

  1. Complete the sync-up by saving your merged master to GitHub.

git push origin master

  1. Return to the current working branch

git checkout ab1234

Commiting

When you finish a key part of your bug, or when you are done for the day, you'll want to log your changes with a commit.

  1. This command shows all your changes.

git status

  1. Add the files you worked on. Make sure you recognize that you actually did work on them!

git add pathToFiles

  1. Delete the files you deleted.

git rm pathToFiles

  1. Alternatively, you can add everything at once, but make sure you know what will be included first.

git add -A

  1. Create a commit with a message describing it.

git commit -m "Description of commit"

  1. Optionally, sync to GitHub. You must do this when you're absolutely done because this will allow you to create a pull request.

git push origin aa1234

Pull Requesting

Once you have pushed, use the GitHub user interface to create a pull request on upstream/master. Make sure to include something like "For #1234" in the description to reference the issue. From here your pull request will be reviewed and eventually deployed!

Once your pull request is merged and tagged as "In Testing", it is expected that you provide instructions on the corresponding issue so that people know what to test (e.g. "Testers: Click on the new button and make sure it does what it says.").

When Things go Wrong

Ask someone!