Join Kevin Skoglund for an in-depth discussion in this video Introducing the Explore California web site, part of Git Essential Training.
- View Offline
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.
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.
- Exploring the history of version control
- Installing Git on Mac, Windows, and Linux
- Initializing a repository
- Writing useful commit messages
- Understanding the Git three-tree architecture
- Tracking when files are added, edited, deleted, or moved
- Viewing change sets and comparing versions
- Undoing changes and rolling back to previous versions
- Ignoring changes to select files
- Creating and working with code branches
- Merging branches and resolving merge conflicts
- Stashing changes for later
- Working with hosted repositories and remote branches
- Developing an effective collaboration workflow