Version 2019-Spring-1.0, Revised 3 March 2019
Activity for practicing with Git branching, GitHub issues and merge requests, and Kanban flow.
For this activity, the students will practice making changes to a GitHub repository. The repository has a text file that has been "scrambled" - meaning that random words have had their characters randomly rearranged, and considered to be issues to be fixed.
The misspellings were generated by the twiddle.py
program and then entered as issues by the report.py
program (from this git-twiddler fork.
- Git installed and configured on your computer.
- GitHub account created and username emailed to professor.
- Invitation to class organization on GitHub accepted.
- SSH key added to GitHub account.
- Fork the repository
- Clone the repository
- Add the original repository as an upstream remote:
git remote add upstream git@github.com:cs-worcester-cs-348-sp-2019/git-issue-activity.git
- Go to the project board: https://github.com/cs-worcester-cs-348-sp-2019/git-issue-activity/projects/1
- Assign yourself to an issue that is unassigned.
- Move the card from
To Do
toIn Progress
.
- Make sure you are on the Master branch:
git checkout master
- Pull any changes that have ocurred since your last pull, and correct merge conflicts
git pull upstream master
- Create a branch named for the issue (e.g.
issue-42
), and switch to that branch:git checkout -b issue-42
- Edit the
LICENSE
file to correct the issue - Add the change
- Commit the change, with a message describing the change (include line number and correction, e.g.
Correct misspelling, line 1: UGN -> GNU
) - Pull any changes that have ocurred since your last pull, and correct merge conflicts
git pull upstream master
- Push the change
git push origin issue-42
- On GitHub, make sure you are on your fork, then switch to the newly pushed branch (e.g.
issue-42
) - Click the
New Pull Request
button. - Include in the pull request text a notation that it closes the assigned issue (e.g.
Closes #42
) - Click
Create Pull Request
- On the project board, move the card for your issue from
In Progress
toWaiting for Merge
.
- If the
Pull Requests
tab shows any pull requests waiting, click on the tab. - Select a pull request from someone else, and click on the title. (Never merge your own pull requests! A pull request should be reviewed by someone other than the person who created it.)
- Click on the commit message (below the comment - you will see the commit number to the right) to view the commit.
- You will see the differences.
- If it looks correct:
- Click on
Review Changes
. - Select
Approve
. - Click
Submit review
. - Merge the pull request.
- The card will automatically move to
Done
because the issue has been closed.
- Click on
- If it looks wrong:
- Click on
Review Changes
. - Make a comment suggesting a correction.
- Select
Request changes
. - Click
Submit review
. - The person who made the merge request will be notified.
- Click on
- If it looks correct:
This work is licensed under the Creative Commons Attribution-ShareAlike 4.0 International License. To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/4.0/ or send a letter to Creative Commons, 444 Castro Street, Suite 900, Mountain View, California, 94041, USA.