Project Repositories
This afternoon I created a repository for each project team. Each team member should have received an invitation and write access to their team’s repository. Please let me know as soon as possible if you have not received the invitation or cannot access your team’s repository.
The master
branch in each project repository is protected, meaning that you
cannot push to it directly. Instead, you must make changes in a branch, push
that branch to GitHub, and create a pull request to have the changes reviewed
and eventually approved and merged into the master
branch.
Assuming that you’ve already cloned the repository, a quick synopsis of this workflow is as follows:
-
Create a new branch. In this example, the branch is named
specification
to indicate that the branch is being used to develop a specification (but of course you can use any branch name that you want).git checkout -b specification
-
Make changes to the branch. In this example, you’d copy the specification template, modify it, and add it to the repository.
git add docs/specs/specification.rst git commit --message "Add specification"
-
Push your branch to GitHub.
git push --set-upstream origin specification
At this point, you’re ready for others to collaborate with you on the pull request – i.e., your teammates should review your changes and provide feedback. Of course, your teammates can also make changes to your branch (e.g., filling in an incomplete section of the specification) and push their changes back to GitHub so others can see them.
Use GitHub’s code review features to indicate
that you believe that a pull request requires changes or is ready to be merged,
in the latter case by clicking the “Approve” button. After the team reaches
consensus that the change is ready to be merged into the master
branch, the
instructor may request further changes or merge it if there are no issues with
the pull request.