Open Source Comes to Campus/For staff

From OpenHatch wiki
Jump to navigation Jump to search

To fork a project on Github[edit]

  • Start out logged in to Github
  • Visit the project you want to fork
  • Click the "Fork" button in the top-right
  • Wait for the animation to conclude
  • Notice that your browser is now visiting a copy of the project in your personal space, rather than the old, group-owned one. You should also see a "fork of..." remark in the top-left.

Now, clone to it to your computer[edit]

  • On the right side, look for the clone URL
  • Copy that to the clipboard
  • Open a terminal and type: "git clone " (including the space, but not including the quotation marks)
  • Use your terminal to "paste" the URL in. (Make sure it starts with https; if not, it is likely to cause problems for students who do not have SSH keys set up, which will probably be the majority of students.)
  • Press enter to do the "git clone" operation.
  • Once you've done that, "cd" into the directory.

Now, make sure you have the project properly set up[edit]

  • Open index.html in your favorite text editor -- it should look like a regular HTML page
  • Make a test change in index.html, save, and reload in the browser. Make sure what you see in the the browser reflects that change.
  • Undo that change, with your editor, save, and then reload in the browser. Make sure what you see in the browser reflects that change.

Find a task[edit]

Now, find a bug on the project's issue tracker that you will work on, and assign it to yourself!

Now, work with your text editor to resolve it!

Commit and push[edit]

Now, commit your changes by typing:

   git add index.html
   git commit -m "Explanation of my changes"

Now, publish those changes on Github by typing:

   git push

Now, visit Github and make sure your personal fork contains those changes.

Create pull request[edit]

Now, visit your personal fork and click the "Pull requests" button on the right. This will offer you the chance to "Create...". Explain what you did, and leave a remark that this relates to the issue number you saw.

Now, get feedback from the project's maintainer, and eagerly await your pull request getting merged!