Objectives

YOUR ANSWER HERE. YOU CAN DELETE THE REMAINDER OF THIS FILE IF YOU WANT TO.



Getting started with git and GitHub

  1. Get an account on GitHub, if you do not already have one.

  2. If git is not installed already, download and install it from git-scm.com/downloads.

  3. Set up your local git installation with your user name and email. Open a terminal and type:

$ git config --global user.name "Your name here"
$ git config --global user.email "your_email@example.com"

Don’t type the $; that just indicates that you’re doing this at the command line. On Windows, you can run these commands in the Linux emulator provided by the git client. Disclaimer: I do not run a Windows machine, so please let me know if Windows instructions are incorrect or out-of-date.

  1. Optional but recommended: set up secure password-less SSH communication to GitHub, following the GitHub instructions.


Basic git concepts


git graph



An elementary task: cloning a remote repository

git clone https://github.com/ionides/810f20.git
[ionides@doob 810f20]$ git pull
Already up-to-date.


A workflow to contribute to the 810f20 GitHub repository

Forking a project and making a pull request

Forking is making your own GitHub copy of a repository. A pull request is a way to ask the owner of the repository to pull your changes back into their version. The following steps guide you through a test example.

  1. Go to ionides/810f20 on GitHub, for example by searching for 810f20.

  2. Click fork at the top right-hand corner, and follow instructions to add a forked copy to your own GitHub account. It should now show up in your account as my_username/810f20.

  3. Clone a local copy of the forked repository to your machine, e.g.,

git clone https://github.com/my_username/810f20.git
  1. Move to the 810f20 directory and edit the file sign_here.html to add your own name.

  2. It can be helpful to type

git status

regularly to check on the current state of the repository.

  1. Commit this change to your local version of the forked 810f20,
git add sign_here.html
git commit -m "sign up for my_name"

and see how the git status has changed. Another useful command for checking on the recent action in the repository is

git log
  1. Push this change to your forked copy of 810f20 on GitHub:
git push
  1. On the GitHub web site for the my_username/810f20 fork, click New pull request and follow instructions. When you have successfully placed your pull request, the owner of the parent repository (me) will be notifed. I will then pull the modifications from your fork into ionides/810f20.