Open Source Comes to Campus/Resources: Difference between revisions
Content added Content deleted
Line 100: | Line 100: | ||
Typically, this takes the following form. |
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 |
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. |
||
The instructor begins by explaining the project in question, and showing how to find the project's Github page. |
The instructor begins by explaining the project in question, and showing how to find the project's Github page. |
||
Line 106: | Line 106: | ||
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 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 " |
* They "fork" 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 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 "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 |
* 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 can 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. |
* Then they 'git push' the change, which updates their master branch on Github. |
||
* Then they visit their fork on the Github website and notice that their fork has their personal work on it. |
* 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. |
* Then they click around in the Github UI to submit a pull request. |