For this activity, you will use what you've learned about git to work collaboratively as a classroom to fill out a couple Madlibs stories.
-
Join a breakout group. One person will work on the code and the others will help them not screw it up. 😜
-
Accept the Github Classroom invite from the class website (the meeting for today). One the one person who will be coding needs to do this. Its not a problem if you all do it.
-
The person coding should log into Repl.it to work on the assignment. Your repo will be automatically cloned.
-
Open the
index.html
file to see the app working on your computer. -
Create new stories, verbs, nouns, adjectives, and adverbs! Or, just one of them---whatever you want. Checkout a new branch with a good name before you do your work. This will be a command like
git checkout -b kyle-new-verbs
Here, I named my branch "kyle-new-verbs". You should name yours something different, no spaces.
-
Take a look around at the files. Familiarize yourself where everything lives.
-
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/my-new-file.js
and in that file, add new verbs. -
Check your code works. Refresh the page a few times. Did you break the app? No? Great!
-
Commit your changes and share them
First, take a look at the status of your work
git status
It should show what files are new and what files are changed. Now, you want to add the new files, try the
git add
command. 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 BRANCHNAME
where
BRANCHNAME
is 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.