|
| 1 | +# mozilla-website |
| 2 | + |
| 3 | +This is just an empty repository containing a README and a picture of a fox. It also contains a HTML file that has a website with just a title. |
| 4 | + |
| 5 | + |
| 6 | + |
| 7 | +## Assignment Part 1 -- HTML |
| 8 | +### 1. Make a branch called `learn-html` |
| 9 | + |
| 10 | +How? |
| 11 | + |
| 12 | +`cd` into your `mozilla-website` project directory. |
| 13 | + |
| 14 | +List all of the branches in the repo: |
| 15 | +``` |
| 16 | +git branch |
| 17 | +``` |
| 18 | +You should only see a `main` branch right now. To create a new branch named `learn-html` run |
| 19 | +``` |
| 20 | +git branch -c learn-html |
| 21 | +``` |
| 22 | +Now list all the repository branches again |
| 23 | +``` |
| 24 | +git branch |
| 25 | +``` |
| 26 | +Do you see the new `learn-html` branch? Notice that the `main` branch is starred, which means that we're currently working within it. Creating a new branch with `git branch -c` will not automatically switch you into it. |
| 27 | + |
| 28 | +To switch into the `learn-html` branch, run |
| 29 | +``` |
| 30 | +git checkout learn-html |
| 31 | +``` |
| 32 | +Try listing the repository branches again. You should see that `learn-html` branch is now starred. |
| 33 | + |
| 34 | + |
| 35 | + |
| 36 | +### 2. Follow this HTML Tutorial |
| 37 | +https://developer.mozilla.org/en-US/docs/Learn/Getting_started_with_the_web/HTML_basics). |
| 38 | + |
| 39 | +**Make sure you make a handful of commits to the `learn-html` branch while working through the tutorial**. |
| 40 | +### 3. Push the branch to GitHub and merge it into `main` |
| 41 | +To push the `learn-html` branch, run `git branch` to make sure you're working on the right branch. Then run |
| 42 | +``` |
| 43 | +git push origin learn-html |
| 44 | +``` |
| 45 | +This will push the current local branch (`learn-html`) to the remote repository on Github. |
| 46 | + |
| 47 | +Now create a pull request from the `learn-html` branch to `main`. |
| 48 | + |
| 49 | +### 4. Switch to the main branch on your computer locally and pull the `main` branch. |
| 50 | +You learned how to switch branches above. To pull the `main` branch down, run |
| 51 | +``` |
| 52 | +git pull origin main |
| 53 | +```` |
| 54 | +
|
| 55 | +## Assignment Part 2 -- CSS |
| 56 | +1. Make a branch called `learn-css` |
| 57 | +2. Follow this [CSS Tutorial](https://developer.mozilla.org/en-US/docs/Learn/Getting_started_with_the_web/CSS_basics). Make sure you make a handful of commits along the way inside the `learn-css` branch. |
| 58 | +3. Push the branch to GitHub and merge it into `main` |
| 59 | +4. Switch to the main branch on your computer locally and pull the `main` branch |
0 commit comments