Copyright
Brief Table of Contents
Table of Contents
Foreword
Preface
Acknowledgments
About this Book
About the Cover Illustration
1. Introduction to Git
Chapter 1. Local Git
1.1. Why do programmers use Git?
1.2. Initial setup
Technique 1 Creating a repository: git init
1.3. .git subdirectory
1.4. Creating a new commit: git add, git commit
Technique 2 Building a new commit in the index staging area: git add
Technique 3 Committing changes to files: git commit
1.4.1. Object store
1.4.2. Parent commits
1.5. Rewriting history
Technique 5 Viewing the differences between commits: git diff
1.6. Diff formats
1.7. Refs
1.8. Summary
Chapter 2. Remote Git
Technique 6 Adding a remote repository: git remote add
2.1. Authoritative version storage
Technique 7 Pushing changes to a remote repository: git push
Technique 8 Cloning a remote/GitHub repository onto your local machine: git clone
Technique 9 Pulling changes from another repository: git pull
Technique 10 Fetching changes from a remote without modifying local branches: git fetch
Technique 11 Creating a new local branch from the current branch: git branch
Technique 12 Checking out a local branch: git checkout
Technique 13 Pushing a local branch remotely
Technique 14 Merging an existing branch into the current branch: git merge
2.2. Merge conflicts
2.3. Rebasing
Technique 15 Deleting a remote branch
Technique 16 Deleting the current local branch after merging
2.4. Summary
2. Git essentials
Chapter 3. Filesystem interactions