Follow these steps when you begin a homework.
- Fork repo.
- Go to the forked version attached to your Github and clone to desktop. You'll know you're on the right page if it says "forked from" in the upper left corner. MAKE SURE YOU ARE WORKING ON YOUR OWN FORK BEFORE ANYTHING Click the "clone button" in the top right to reveal the HTTPS key. In the command line, navigate to the directory where you want your homework to live. Once you are there, do the command
git clone [_paste https key_]
. This will pull all of the information from your remote(browser) repo to a local version of it on your desktop.
- Do your homework.
When you've finished your homework, all you have to do is get it online. To do this, follow these steps:
-
Stage your changed files (git add .), commit your code (git commit -m '[your words here!]') and push to your remote repository. In bullet points, your command line should look like.
git add .
git commit -m "finished homework"
git push origin master
Tip:
after 'git add .', you can use the command
git status
to make sure your changes have been staged before committing -
In your browser, go to your repo for the homework. You should now see all of your completed homework there. Once you confirmed you're homework is online, you can:
- Start a new pull request. Pull requests let you tell others about changes you've pushed to a GitHub repository. Once a pull request is sent, interested parties can review the set of changes, discuss potential modifications, and even push follow-up commits if necessary. We will be using pull requests to submit homework. First, click here:
- Then, make sure you are comparing the correct repos. The base (first repo) should reference the homework assignment. The head (second repo) should reference the work you completed.
- Fill out your submission. When submitting, include the following:
- Click
Create Pull Request
to submit your work!