Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 29 additions & 10 deletions courses/foundation/git/week1/session-plan.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ These are some examples of previously created materials by mentors that you can

9. Demonstration to making a commit
- what happens after each `git add` and `git commit`
- show how to `git add` all changes, or specific files
- show `git status` and `git log`

10. Explain what happens after `git push`
Expand All @@ -75,17 +76,35 @@ These are some examples of previously created materials by mentors that you can
1. Create a branch
2. Make a commit
3. push changes to remote
4. Create a pull request
5. Update local `main`

12. Useful VS Code extensions
12. Pull Requests
1. Create a pull request
2. Reviewing a pull request (commenting, approving, requesting changes)
3. Merging a pull request
4. Updating local `main`

- GitLens - Git supercharged
- GitHub Pull Requests
13. Forks
- Your "copy" of a source repository
- How forks are useful for collaboration

### Exercise 1: Assignments repository
14. Useful VS Code extensions
- GitLens - Git supercharged
- GitHub Pull Requests

**Objective:** Create a repository on your GitHub following the instructions from [hyf-assignment-template](https://github.com/HackYourFuture-CPH/hyf-assignment-template). Then you will add the session exercises from the previous week, to the `html-css/week1` folder, by first checking out to a new branch called `html-and-css`. Create a PR to your own repo introducing those changes to `main`. Finally, have the person on your right review this PR before you agree to merge it to `main`.
### Exercise 1

**Objective:** The goal is to set up your assignment repository fork and create your first PR (Pull Request).

> [!NOTE]
> You will use this repository to hand in your assignments during the entire HackYourFuture program.

1. Create a repository fork on your GitHub and clone it locally, following the instructions from [HackYourFuture-CPH/hyf-assignment-template](https://github.com/HackYourFuture-CPH/hyf-assignment-template)
2. Check out to a new branch called `html-and-css`
3. Add the session exercises from the previous week to the `html-css/week1` folder
4. Create a PR (Pull Request) [to your own repository](https://github.com/HackYourFuture-CPH/hyf-assignment-template?tab=readme-ov-file#2-submission-process), from your `html-and-css` branch to merge changes into the `main` branch
5. Finally, have the person on your right review this PR before you agree to merge it to `main`.

**Tips for this exercise:**

- Use descriptive `commit` messages
- Make a commit for each folder/exercise you add (makes it easier to track changes/updates)
Expand Down Expand Up @@ -116,13 +135,13 @@ These are some examples of previously created materials by mentors that you can
5. Add more text to the `my-assignment.txt` file
6. Add and commit the changes in the `my-assignment.txt` file
7. Push your changes to GitHub
8. On GitHub, create a pull request from the exercise branch to `main`
8. On GitHub, create a pull request (on your own fork) from the exercise branch to `main`
9. On your computer add some more text to the `my-assignment.txt` file
10. On your computer, add and commit the changes in the `my-assignment.txt` file
11. Push the changes to GitHub
12. On GitHub, check what happened to the pull request you created in step 8.
13. If you are on an individual assignment repository approach, merge the PR and proceed to the next step. If you are on a central assignment repository approach, DO NOT merge the PR, and skip the next step.
14. Go to the `main` branch and update `main` by "downloading" the new commits from GitHub: `git pull origin main`.
13. Merge the pull request.
14. Locally, go to the `main` branch and update `main` by "downloading" the new commits from GitHub: `git pull origin main`.

### Exercise 4

Expand Down