In the last chapter we went over the basics of how to track files using Git.
We saw how to add files, how to edit them, how to delete them, how to rename them,
and how to see differences between the files using git diff, and then how to use
git status and git log.
Those commands together probably make up 75% of what you are going to do with Git.
They are the core actions that you are going to repeat over and over and over again.
Now, there is more that we can do, and we are certainly going to go into that to
make sure that you have a rounded out view of how to use Git.
But before we do, I want us to switch from using the sample files that we have
been using so far in our first_git_project and start using something that feels
more like a real project. Hang on to this first_git_project.
It still can function like a sandbox for you, a place where you can go if you
have questions or you want to try things out, you can go there and not do
anything that's destructive to your main files.
But I want us to start working with a real project, and you can use your own
project if you have one.
I am going to use one that's from the exercise files, which is called
explore_california, it's the Explore California web site.
I am going to drag that, with Option held down, into my Documents directory so
that now it exists right alongside my main project.
So inside explore_california we've got a bunch of HTML files, some folders,
those folders contain some things like some CSS and some JavaScripts, but
this is all basic HTML.
In order to get this to work, all you should have to do is drag index.html onto
a browser, or you can go into a browser and locate it that way.
Now, you won't have to put these files in any kind of special web directory
or anything like that, because they are just basic HTML files, our browser can render them.
We don't first have to go through a web server like we would if we had PHP or
Ruby on Rails files.
In the rest of this chapter we are going to get familiar with this project, we
are going to initialize it as git repo and see how we can make some edits and
commits that might be like the kinds of edits and commits that one would make in
the real world, and then we'll go on with learning more of the features of Git.
This will allow you to practice some of the techniques that we learned in the
last chapter while giving you some real world exposure to how we would use Git,
and then we can go on to learning more features in Git.