Exercise: Branches!
In this exercise, you will adding new features to your pet adoption website. You will be adding a gallery page, and if there is time, a contact page.
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. Set up
- Switch back to your project folder with your pet adoption website.
- Use git status to double check to make sure you have no modified/uncommitted changes
- Use git branch to double check what branch you are on (it should be master!)
2. Gallery Page
- Create a new branch named gallery-feature and switch over to it
- Add a gallery.html. If you don't want to write a bunch of html and text, you can just copy the contents of this file: gallery.html
- Add some more images to your images folder. If you have time, create some image tags inside of gallery.html and include the images from the images folder.
- Anything else you can think of that would work well on a gallery page
- At this point you should have at least one or more commits on your gallery branch (use git log to double check!)
- When you have determined your feature done, merge your feature branch into master
- Once merged, make sure to delete your feature branch
3. Contact Page
- Create a new branch named and switch over to it contact-feature
- Add a contact.html. You can copy the contents of this page: contact.html
- Add anything else you think would make sense
- Once your feature is done (you should have at least one commit on this branch!), merge your feature branch into master
- Once merged, make sure to delete your feature branch
Don't forget to run git status regularly so that you can see what is happening at each stage!