Chapters ▾
1st Edition
-
. Getting Started
- .1 About Version Control
- .2 A Short History of Git
- .3 Git Basics
- .4 Installing Git
- .5 First-Time Git Setup
- .6 Getting Help
- .7 Summary
-
. Git Basics
-
. Git Branching
-
. Git on the Server
- .1 The Protocols
- .2 Getting Git on a Server
- .3 Generating Your SSH Public Key
- .4 Setting Up the Server
- .5 Public Access
- .6 GitWeb
- .7 Gitosis
- .8 Gitolite
- .9 Git Daemon
- .10 Hosted Git
- .11 Summary
-
. Distributed Git
-
. Git Tools
- .1 Revision Selection
- .2 Interactive Staging
- .3 Stashing
- .4 Rewriting History
- .5 Debugging with Git
- .6 Submodules
- .7 Subtree Merging
- .8 Summary
Chapter 2
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.