Exercise: Commits!

In this exercise, you will be creating a repository and adding some project files. You will be working on creating a very simple adoption website for dogs (or any animal you like).

As you read through these steps, think about when would be a good time to commit. As you execute the steps, YOU get to decide when to commit.

  1. Create a new folder on your Desktop and make it a repository.
  2. Hint: Do not be inside of your current project folder when you make a new folder. Make sure you are on your desktop!
    Hint 2: make sure you are inside of the folder when you make it a repository!
  3. Add an index.html. If you don't want to write a bunch of html and text, you can just copy the contents of this file: index.html
  4. Would this be a good time to commit?
  5. Add a css folder with a css file. Add some basic css. You can also just copy the contents of this file: custom.css
  6. How about this time? Is this a good time to commit?
  7. Create an images folder and add three images. If you have time, create some image tags inside of your html and include the images from the images folder.
  8. Commit, perhaps?
  9. Look at your history with git log as you add more commits (and try adding the --oneline option)

Don't forget to run git status regularly so that you can see what is happening at each stage!