Skip to content

Commit

Permalink
Update hand-in-homework-guide.md
Browse files Browse the repository at this point in the history
Add explanation to avoid errant files showing up in pull requests
  • Loading branch information
robvk authored May 24, 2021
1 parent 4312acb commit 158a24b
Showing 1 changed file with 11 additions and 14 deletions.
25 changes: 11 additions & 14 deletions hand-in-homework-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,30 +12,27 @@ Watch the video (by clicking the image) or go through the following walk-through

ONE TIME ONLY (START OF EVERY MODULE)

1. Create a [fork](https://help.github.com/en/articles/fork-a-repo) of the [HackYourHomework](https://www.github.com/hackyourhomework/databases) module repository. You do this by using the `fork` option on the top right
1. Create a [fork](https://help.github.com/en/articles/fork-a-repo) of the HackYourHomework module repository. For Databases the homework module repository is `https://www.github.com/HackYourHomework/Databases-classXX` where XX is your class number. You do this by using the `fork` option on the top right
2. Navigate to the URL of the cloned repository (it should be in your personal GitHub account, under "repositories")
3. Clone the repository, using SSH, to your local machine. You can do this by typing in `git clone <git url>` in the command line
4. On your local machine, navigate to the folder using the command line
5. Make sure you've cloned it correctly by running `git status` from the command line.

EVERY WEEK

1. Create a new branch for each week you have homework. For example, for the week 1 homework for Datanases create a branch called `week-1-homework-YOUR_NAME`
2. Inside the correct week folder, create another folder called `homework`. Make your homework files in there, while on the correct branch
3. Once you're finished, add and commit everything. Make the commit message meaningful, for example `finished project for homework week1`
4. Push the branch to your forked repository
5. On the GitHub page of your forked repository, click on the `create pull request` button. Make sure the `base repository` is the original, on branch master
6. Give the pull request a title in the following format:
1. Do a `git pull` on your main branch to get the latest version.
2. Create a new branch for each week you have homework. For example, for the week 1 homework for JavaScript create a branch called `YOUR_NAME-w1-JavaScript`. Don't forget to checkout this branch after creating it.
3. Make your homework!
4. Once you're finished, add your homework to a commit. Make sure you *only* commit your homework files and nothing else. You can use `git add -p` if you only want to add a couple files. You can always check what is happening with the `git status` command (as one of our mentors always says, it is the console.log of git!).
5. Create the commit (`git commit`). Make the commit message meaningful, for example `finished project for homework week1`.
6. Push the branch to your forked repository
7. On the GitHub page of your forked repository, click on the `create pull request` button. Make sure the `base repository` is your teacher's repository, on branch master
8. Give the pull request a title in the following format:

```markdown
Homework week 1 <Your_Name>
Homework week 1 <Your name>
```

7. Submit the pull request from your forked repository branch into the `master` branch of the original repository (which is [HackYourHomework/databases](https://www.github.com/hackyourhomework/databases))
8. Do a little victory dance because you did it! Good job!

For a visual walkthrough the steps please watch the following video one of our teachers, Unmesh Joshi, has made:

- [GitHub Homework flow](https://www.youtube.com/watch?v=2qJPAVTiKPE)
9. Submit the pull request from your forked repository branch into the `main` branch

If you have any questions or if something is not entirely clear ¯\\\_(ツ)\_/¯, please ask/comment on Slack!

0 comments on commit 158a24b

Please sign in to comment.