Open Source Comes to Campus/Resources: Difference between revisions

Typically, this takes the following form.
 
Before the session, an instructor creates a sample repository where it is safe to merge pull requests from students. This could be a personal project of theirs, or a fork of someone else's project through which they create a sandbox to accept students' work where it is okay to eventually erase those changes, or an automatically-cleared repository (such as one automirrored from elsewhere, where remote changes clobber changes made in Github).
 
The instructor begins by explaining the project in question, and showing how to find the project's Github page.
They then use the Github website to point to a particular file that can accept simple, text-based edits, typically a file like README. They then navigate to a terminal and demonstrate how to create a pull request by demonstrating all the following steps:
 
* They "forkingfork" the project into their personal Github account. (In most cases, instructors are demonstrating a personal project; in this case, it would be wise for the instructor to create a dummy Github account to be the person submitting the pull request. This also avoids some trouble where Github accounts that are part of "organizations" see a slightly different fork UI than accounts that aren't.)
** They explain the key concept about forking: This copies all the history of the project into a space they are permitted to modify.
* They "clone" the repository onto their own computers.
* They make a change on their own computer, and run 'git add' on the change. Then they use 'git commit -m' to commit the change. The change is usuallycan be as simple as adding their name to a README file. It can also be silly.
* Then they 'git push' the change, which updates their master branch on Github. They should stop to explain this.
* Then they visit their fork on the Github website and notice that their fork has their personal work on it.
* Then they click around in the Github UI to submit a pull request.