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.
- Create a new folder on your Desktop and make it a repository.
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!
- 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
- Would this be a good time to commit?
- Add a css folder with a css file. Add some basic css. You can also just copy the contents of this file: custom.css
- How about this time? Is this a good time to commit?
- 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.
- Commit, perhaps?
- 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!