Git Community Book

The Git Community Book

Welcome to the Git Community Book. This book has been built by dozens of people in the Git community, and is meant to help you learn how to use Git as quickly and easily as possible.

If you see anything out of date, have a suggestion on how to improve it, or would like to help add to the book, please see the How to Contribute page, or just send our maintainer a note.

Download

Click here to download the current PDF version of this book.

New to Git?

If you want to really understand Git, You may want to start at the beginning.

If you just want to jump right in, you can skip right to setting it up.

1. Introduction

Welcome to Git
The Git Object Model
Git Directory and Working Directory
The Git Index

2. First Time

Installing Git
Setup and Initialization

3. Basic Usage

Getting a Git Repository
Normal Workflow
Basic Branching and Merging
Reviewing History - Git Log
Comparing Commits - Git Diff
Distributed Workflows
Git Tag

4. Intermediate Usage

Ignoring files
Rebasing
Interactive Rebasing
Interactive Adding
Stashing
Git Treeishes
Tracking Branches
Finding with Git Grep
Undoing in Git - Reset, Checkout and Revert
Maintaining Git
Setting Up A Public Repository
Setting Up a Private Repository

5. Advanced Git

Creating New Empty Branches
Modifying your History
Advanced Branching And Merging
Finding Issues - Git Bisect
Finding Issues - Git Blame
Git and Email
Customizing Git
Git Hooks
Recovering Corrupted Objects
Submodules

6. Working with Git

Git on Windows
Deploying with Git
Subversion Integration
SCM Migration
Graphical Git
Hosted Git
Alternative Uses
Scripting and Git
Git and Editors

7. Internals and Plumbing

How Git Stores Objects
Browsing Git Objects
Git References
The Git Index
The Packfile
Raw Git
Transfer Protocols
Glossary
github logo