Skip to content

barrycumbie/pd-collaborate-with-github

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 

Repository files navigation

Teacher Professional Development Session 2: Collaborating with GitHub

Assignment

Task 1: Editing someone else's code

Let's create merge conflicts!

  1. Click the Fork button in the top right corner to generate your own copy of this repository.
  2. In your locations.md file, list where you are from (this can be where you live, where your school is located, your hometown, or where you'd rather be right now 😄).
  3. Commit your changes.
  4. Go back to the front page of your repository. You will see that you have a branch that has 1 commit ahead of the original files. Click on Pull Requests to start a Pull Request. You can stop here for now.

image

Task 2: Merge Conflicts

  1. If you have a merge conflict, you'll need to resolve it before you can submit your pull request. The merge conflict will look like this:
<<<<<<< new branch
your new changes
=======
changes from the owner of the original file
>>>>>>> original-branch

Delete the lines with <<<, >>>, and ===. Edit the changes so that the final result includes your city but doesn't remove anyone else's city.
2. Once you have completed your pull request, submit it. Then wait for the facilitator to approve your changes and "pull" them into the original repository.
3. You may have a new merge conflict to resolve if other participants have added changes before you. Not to worry, you'll just get more practice 😁.

Task 3: Code Review

If there is time, we'll practice code reviews.

  1. The facilitator will add you as a collaborator on the original repository. You'll be able to merge your own pull requests, but only after someone else has reviewed your code!
  2. Once the facilitator has added you as a collaborator, you'll receive an email to accept the invitation to the repository. You can also accept the invitation with this link: https://github.com/arelia-classroom-demos/[insert name of repository here]/invitations
  3. Edit the what-do-you-teach.md file and commit your changes in a new branch.
  4. Open a pull request to add your changes to the main branch (this may open automatically when you choose to commit to a new branch)
  5. Add one of your classmates to review your changes in your pull request. Resolve any merge conflicts if they arise in your pull request.

About

Learn to Collaborate on GH

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published