Skip to content

Exercise Committing and Pushing

Robert Adams edited this page Sep 8, 2018 · 3 revisions

Prerequisites

Make sure you've already done the Github forking exercise.

Exercise

Make your commit history look like this:

exercise

where the Added cheese commit adds a file called cheese.c with these contents:

blue
cheddar
swiss

the Added simpsons commit adds a file called simpsons.c with these contents:

bart
lisa
maggie
homer
marge

and the Added my own dogs commit adds new dog types to the bottom of dog.c.

NOTE: Your commit hashes will be different from mine--this is because the commit hashes take time and name and email into account.

Once your commit history looks like this, push your master branch to github.

git push origin master

You may find the git commit --amend command useful to edit an existing commit (in case you mess up).

Finish Bootcamp

Go back to the main page.

You can’t perform that action at this time.