-
Notifications
You must be signed in to change notification settings - Fork 48
Git Reference
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.
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
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:
- Enter your rSENSE fork.
cd rSENSE
- Pull changes from isenseDev/rSENSE.
git fetch upstream
- Merge these changes into your current branch.
git merge upstream/master
- If your current branch is not
master
, switch tomaster
and merge there too, since this is always your starting point for new bugs.
git checkout master
git merge upstream/master
- Complete the sync-up by saving your merged
master
to GitHub.
git push origin master
- Return to the current working branch
git checkout ab1234
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.
- This command shows all your changes.
git status
- Add the files you worked on. Make sure you recognize that you actually did work on them!
git add pathToFiles
- Delete the files you deleted.
git rm pathToFiles
- Alternatively, you can add everything at once, but make sure you know what will be included first.
git add -A
- Create a commit with a message describing it.
git commit -m "Description of commit"
- 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
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.").
Ask someone!
General
- New Developer Reference
- Setting up a Dev Environment
- The Scrum Board
- Git Reference
- Web Technology Reference
- Reviewing Pull Requests
-
Deploying
Misc
Security
Code Documentation