Creating New Branch in Git for Lesson Work


This lesson is just a quick reminder that we should be pushing our code to Github pretty frequently. You might have already been doing this. If you've been following the lessons verbatim we're still in the Unit 3 branch. Let's go ahead and create a new branch for our all of our Unit 4 code.

git branch Unit4Lessons

git checkout Unit4Lessons

git add .

git commit -m "support for lessons and video storage"

git push

This chain of git commands will push all of our code to our new branch. To get our changes in the master branch we need to merge the Unit4Lessons branch into it:

git checkout master

git merge Unit4Lessons

git push

Now all of our latest code is in the master branch as well as isolated in it's own branch so we can come back to it if we ever need to. We could push the master branch out to production if we wanted, but we're going to hold off until we can be helped through some configuration setup on our production server.

Happy coding!!!!