[[ch02-git-basics-chapter]]
== Git Basics

If you can read only one chapter to get going with Git, this is it.
This chapter covers every basic command you need to do the vast majority of the things you'll eventually spend your time doing with Git.
By the end of the chapter, you should be able to configure and initialize a repository, begin and stop tracking files, and stage and commit changes.
We'll also show you how to set up Git to ignore certain files and file patterns, how to undo mistakes quickly and easily, how to browse the history of your project and view changes between commits, and how to push and pull from remote repositories.

include::book/02-git-basics/sections/getting-a-repository.asc[]

include::book/02-git-basics/sections/recording-changes.asc[]

include::book/02-git-basics/sections/viewing-history.asc[]

include::book/02-git-basics/sections/undoing.asc[]

include::book/02-git-basics/sections/remotes.asc[]

include::book/02-git-basics/sections/tagging.asc[]

include::book/02-git-basics/sections/aliases.asc[]

=== Summary

At this point, you can do all the basic local Git operations -- creating or cloning a repository, making changes, staging and committing those changes, and viewing the history of all the changes the repository has been through.
Next, we'll cover Git's killer feature: its branching model.
