Skip to content

Exercise Committing and Pushing

Kenny Yu edited this page Oct 23, 2013 · 2 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.