Assignment 3 - Git Practice
In workshop 3, we installed VSCode and git and learned about how we can use these tools to improve our developer experience. In assignment 3, we will practice working with git repositories.
Core requirements
This assignment has 3 parts. But don't stress, it will likely be the shortest assignment of the series!
For each part, we provide step-by-step instructions for how to complete it. We expect you to know how to do each step after watching workshop 3. If anything is confusing, reference the workshop 3 slides and recording, or just google it.
Part 1: Make a public git repository with some html and css code inside.
- In an empty folder on your device, initialize a git repository.
- Put some HTML & CSS code inside this folder.
- Use your jsfiddle code from assignment 2.
- If you did not complete assignment 2, use this jsfiddle.
- You should have at least 1
.html
file and at least 1.css
file.
- Stage and commit your changes to the main/master branch.
- Create a new repository on Github. Name it whatever you want.
- Push your local git repository to that remote Github repository.
Part 2: Add a README file using a new branch.
- In your local git repository, make a new branch called
readme
. Switch to this new branch. - Add a new file called
README.md
. - In this file, provide a brief description of your repository. What does the code do and what purpose does it serve?
- Stage and commit your changes.
- This commit should be attached to your new branch, and not the main branch.
- Push your branch onto Github.
- On Github, make a pull request for your branch. Then, merge it into main.
- When viewing the main branch, you should now see your commits from your readme branch as well as a merge commit. Feel free to delete your readme branch after it is merged.
For parts 1 and 2, you will submit a link to your github repository.
Part 3: Fork the DISC workshop website repo and submit a PR.
- Fork the DISC workshop website repository.
- Clone your fork onto your device.
- Open the file called
disc-members.md
. Add your name to the bottom of the list. - Stage and commit your changes to the main branch.
- Push your changes onto Github.
- On Github, make a pull request from your fork.
For part 3, you will submit a link to your fork.
Additional requirements
If you feel like it, here are some more things you can do to practice using git. There is nothing to submit for this, it's just for personal practice.
- Make a private repository, and put one of your homework assignments in there.
- Do NOT, under any circumstances, EVER, put your homework in a public repository.
- Try merging some branches using the squash and merge feature, or the rebase and merge feature, and see what happens.
- For a merge conflict to happen. Resolve it.
- Make a branch A, add some commits, and then make a new branch B that branches off branch A. Add some additional commits to both branches A and B. Then make branch C branching off branch A, and branch D branching off branch B. Add some more commits to A, B, C, and D. Then try merging everything back together into main.
Tips
- If you're ever stuck, google is your best friend.
- If that doesn't work, consult the workshop slides and recording.
- Ask for help on discord.
Resources
- Workshop 3 slides and recording, which you can find here.
- Honestly, that has everything you need.
Submission
For feedback from DISC exec
Follow these instructions if you are submitting to get feedback from DISC exec. The deadline for your submission is 1 week after the associated workshop.
-
For steps 1 & 2, you'll submit the link to your public github repository.
-
For step 3, you'll submit the link to your fork.
-
Fill out this Google form.
For the Discover Program Application
If you are not submitting for DISC exec feedback, but for your Discover Program Application, follow the submission instructions in the application form.