Find a partner, then pair up with another pair. These 2 pairs will form a team.
Each pair will sometimes be a maintainer and sometimes a contributor. Rotate roles as necessary to ensure everyone in your team gets a chance to experience each role.
In this activity your team will play out several scenarios following steps described in Workflow Reference.
- Complete each part in order.
- Complete each step in each part in order.
If you currently have an account on GitHub, use that for this lab.
If you do not currently have an account on GitHub, create one now:
- Go to github.com
- Follow these WikiHow instructions. Select the free plan (for public and open source repositories).
- Make sure at least 1 member from each team is logged into GitHub.
- Have one member of one of the teams click on the button with their username/photo at the top left of the page, in the feed. Select "Create organization" from the drop-down menu that appears.
- Name the organization whatever you like.
- Set the default permissions so that all organization members can create projects and write to any project in the organization. (This would be all members of your team and all members of the other team.)
- Add all members of both teams to the organization.
- Name it
ourfavorites - Give it a default README.md file.
- Select a team member from one team to be Contributor-1
- Select a team member from the other team to be Contributor-2
- Help Contributor-1 to follow Setup: (1-3) in the Workflow Reference to prepare their local and remote repositories.
- Help Contributor-1 to follow Starting your contribution: (4-8) to add a
new file
favorite-foods.txtthat contains a couple of Contributor-1's favorite foods. - Help Contributor-1 to follow Update your master (25-26) and Delete unneeded branches (27-29) to clean up.
Congratulations, your team has made its first contribution! Celebrate. 👏 👏
- Help Contributor-2 to follow Setup: (1-3) to prepare their local and remote repositories.
- Repeat the steps above to have Contributor-2 contribute a new file
favorite-movies.txtwith a couple of their favorite movies. - Repeat the steps above to have Contributor-2 update their master and clean up.
Celebrate again. 👏 👏
- Contributor-1's repositories are out of synch. Help Contributor-1 follow Keep your repositories up-to-date (13-19) to update their repositories.
Celebrate. But keep it small. 👏 Don't worry, there will be bigger celebrations later.
- Have Contributor-1 and Contributor-2 independently follow the contribution
workflow to add another favorite food to the end of
favorite-foods.txt. - Contributor-1 should commit and push their changes before Contributor-2. This should be successful.
- Contributor-2 should try to commit and push their changes after Contributor-1 pushes their changes. This should fail.
- Help Contributor-2 follow Keep your repositories up-to-date (13-19) to synchronize their repositories and resolve the conflicts.
- Have contributors clean up.
Celebrate enthusiastically. 👏 👏 👏 That was challenging.
- Have each contributor make multiple commits to their local repository.
- Help contributors to follow Squash your commits (20-21) to squash their commits into a single commit and push it.
- Contributors, don't forget to clean up.
This is another moment for an enthusiastic celebration. 👏 👏 👏 👏 👏 Well done!
Here is where we do the whole fork and pull request thing.
This lab was modified by Amy Csizmar Dalal from a lab by Darci Burdge and Stoney Jackson.
Copyright 2016 Darci Burdge and Stoney Jackson SOME RIGHTS RESERVED
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/ .