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 repository
initialized 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,
fork
a copy to your own GitHub account, then - Make a change (anywhere) to its README file,
Commit
your change, and submit apull request
to the author.- Then, look over all
pull request
s from the class, within your ownrepository
, - Accept the changes you like and
merge
these into your “source code”, and - Finally, resolve any
merge conflict
s.
Create a Remote Repository on GitHub
- Log into your GitHub account, and from the front page, click the green New button and initialize a
repository
with 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,
copy
the address of your newrepository
. Paste
this 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
fork
button in the upper-right. - In your own “forked” copy of the
repository
, click thepen tool
to 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…)
Commit
your changes.- Submit a
pull request
to the original author.
Merge
changes in your own repository
- Go back to your own
repository
- Click on
pull request
s. 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 request
s 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 request
s. They should all bemerge
d or closed.