For this activity, you will use what you've learned about git to work collaboratively. We're going to write some funny Madlibs-style stories.
-
Form a group with your neighbors. You should choose one person whose computer you will use. Only one person needs to follow these instructions (but all should read them 🤣)
-
Fork this starter repository on GitHub. Forking means to make a copy of the code but attach it to your own GitHub repository so that you can make changes. Technically you are "cloning" the starter repo. GitHub calls this "forking" because they add some other bells and whistles on top. You should see a grey button at the top that says "fork"---that is what you want. If you need more information, look at https://help.github.com/articles/fork-a-repo/
-
Open a new "CodeSpace" on GitHub. This will start an in-browser instance of the popular Visual Studio Code editor. (If you're a ninja, clearly do whatever you want instead.)
-
Right-click on the
index.htmlfile and then click "Show Preview". You can either make it public or preview in browser. It doesn't matter. -
Take a look around at the files. Familiarize yourself where everything lives.
-
Create new stories, verbs, nouns, adjectives, and adverbs! The instructor will likely assign you to one of these. Checkout a new branch with a good name before you do your work. This will be a command like
git checkout -b bald-chicken-new-verbs
Here, I named my branch "bald-chicken-new-verbs". You should name yours something different, no spaces. E.g. your branch name might be "fire-lion-new-stories" or "rad-verbs-for-class-by-sleek-deer".
- Create a new file. You can also edit existing files, but that will make our merging harder! If you want to make a new file of verbs, you might make a file at
/js/verbs/bald-chicken.jsand in that file, add new verbs.
You should choose a name other than "bald-chicken.js".
-
If you added a new file, make sure you include it from
index.html. -
Check your code works. Did you break the app? No? Great! (You can check the preview to see if it works as expected. Do you see your new content? Also you can run
npm testfrom the terminal to run some automated sanity tests.) -
Commit your changes and share them
First, take a look at the status of your work
git statusIt should show what files are new and what files are changed. Now, you want to add the new files, try the
git addcommand. You'll need to supply a file name.Once you've added your changes to the "staging area", you want to make a commit. This is a command like
git commit -m "Added some verbs for class"Now, push your changes up to GitHub.
git push origin BRANCHNAMEwhere
BRANCHNAMEis the name of your branch. -
Go to GitHub, find your fork and the new branch, then make a pull request
Pull requests let you tell others about changes you've pushed to a repository on GitHub. 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.
Click on the logo at right to get started.
.
Then, once you get to another page, click the blue link.

Finally, click the create button to checkout the commit.
If you need extra help, check this out https://help.github.com/articles/using-pull-requests/ or just come see a TA. -
The instructor will merge in everybody's work.