Lab 4 Part 1: Pull Requests + Merge Conflicts
Refer to the Tutorial on Pull Requests + Merge Conflicts and to Lab 3 for an explanation of the steps below.
For this lab, you’ll be:
- Creating a
remote repositoryinitialized with a README.md file on GitHub, then - Posting its address to Google Sheets;
- Visiting the other repositories listed on the same Sheet, and
- For each repository,
forka copy to your own GitHub account, then - Make a change (anywhere) to its README file,
Commityour change, and submit apull requestto the author.- Then, look over all
pull requests from the class, within your ownrepository, - Accept the changes you like and
mergethese into your “source code”, and - Finally, resolve any
merge conflicts.
Create a Remote Repository on GitHub
- Log into your GitHub account, and from the front page, click the green New button and initialize a
repositorywith a README.md (i.e. be sure to check the box for a README file). - Write something in your own README file. This can be anything, really. Sprinkle some random text on multiple lines to give your file some dimension. Even just something short to identify yourself is fine! This is like your source code…
- Now, from the address bar in your web browser,
copythe address of your newrepository. Pastethis address into the Google Sheet below, next to your name. You’ll need to sign into Google Sheets with your Entertainment Technology email address in order to add your link. If this doesn’t work, send the instructor an email with your link and it will be added immediately.
The sheet will become populated with new repos for each member of our class, so refresh this page frequently:
Do this part “for each” repo listed in the Google Sheet:
- Visit a repository for clicking on the link in the Google Sheet.
- Click the
forkbutton in the upper-right. - In your own “forked” copy of the
repository, click thepen toolto directly edit the README.md file. - Make changes, enter new text, or scramble the text that’s already there. Go crazy! (You can also copy and paste the same text into each of the repositories on the Sheet, to make things go faster…)
Commityour changes.- Submit a
pull requestto the original author.
Merge changes in your own repository
- Go back to your own
repository - Click on
pull requests. There should be a number of them, once all students have had a chance to submit theirs. - Click on the Merge pull requests button.
- Examine any conflicting changes where multiple users have submitted changes on the same line of code.
- Edit your document by selecting the changes that seem “best.”
- When you’re finished, click Mark as resolved and finally Commit merge.
- For any remaining
pull requests that you don’t approve of, hit Close and commment. Feel free to include a message to your classmages about why you’re not accepting their changes. - Your lab is complete when there are no outstanding
pull requests. They should all bemerged or closed.