This is where all code will be uploaded
To clone this repository, enter git clone https://github.com/Ecse211
in the desired directory. It will create a Ecse211
folder containing our project code.
- Before making changes or switching branches, make sure to pull.
- Do not make changes in the master branch.
- Instead, make a new branch:
git branch <branch-name>
- This new branch is basically a copy of the master branch.
- Go to new branch:
git checkout <branch-name>
- List all branches:
git branch
- Instead, make a new branch:
- Only pull from the master branch.
- Go to master branch:
git checkout master
- Pull from master branch:
git pull origin master
- Go to master branch:
- To commit changes:
git commit -m "Commit Message"
- If you want ot close issue 3 for example, your commit message should include
Closes #3
.
- If you want ot close issue 3 for example, your commit message should include
- To push changes to GitHub:
git push -u origin <branch-name>
- To merge pushed changes with master branch, create a pull request and get one person to approve your request.
- Go to the "Issues" tab on GitHub.
- Look for an issue to fix or create your own issue (press "New issue").
- If you are fixing another person's issue:
- You can leave a comment if you have questions for the guy (or girl) who created the issue.
- Go directly to step 3.
- If you are creating your own issue:
- You must add the label/milestone sprint1, sprint2, or sprint3. Otherwise, the TA won't be able to check our issues.
- Also, add a priority label if necessary:
- If it needs to be fixed in the next 24 hours and it's really important, use the "Priority 1 [Urgent!]" label.
- If it's really important but we have time, use the "Priority 2" label.
- If it's somewhat important, use the "Priority 3" label.
- You can add other labels like "bug", "help wanted", or "question" to make your issue more helpful to others.
- If you want to include a comment for your issue, it can be in the form of a user story:
As a <type of user>, I would like <feature description> so that <rationale>.
- Example user story:
As a course instructor, I would like to add content to a course so that enrolled students can access it on demand
.
- If you are fixing another person's issue:
- Create branch:
git branch <branch-name>
- Go to branch:
git checkout <branch-name>
- Fix the issue (this is the step where you actually make changes to the code in our project!).
- Commit your code:
- Add to commit:
git add <filename>
- Ensure that the proper files are green in
git status
- To undo step 1:
git reset
- Commit:
git commit -m "Commit Message"
- In the
"Commit Message"
, you can automatically close an issue by including the phrasecloses #4
(in this case#4
is the ID number of the issue, you can find this number in the "Issues" tab on GitHub). - Aside from
closes
, you can use the keywords:close
,closed
,fix
,fixes
,fixed
,resolve
,resolves
, orresolved
. It can be capitalized too.
- In the
- Add to commit:
- Push your code to online master branch:
git push -u origin <your-branch-name>
(DO NOT push from your local master branch). - Go to the "Pull requests" tab on GitHub. Press the "Create pull request" button for your branch.
- Travis CI will tell you if your build succeeded or failed in the Pull requests tab.
- If it failed, go back to step 5.
- If it succeeded, get someone to approve it in "Pull requests" tab.
- If you didn't automatically close the issue you were trying to fix in step 6.1.1, you can do that manually right now. Go to the "Issues" tab, click the issue you fixed, then press the "Close issue" button.
- Switch to master branch:
git checkout master
- Pull from master branch:
git pull origin master