Chapter 1. Local Git
Listing 1.1. Setting a name and email address
Listing 1.2. Initializing a Git repository
Listing 1.3. Listing files created in a new repository
Listing 1.4. Adding a file to the index
Listing 1.5. Committing changes staged in the index
Listing 1.6. Making a second commit
Listing 1.7. History output
Listing 1.8. Differences between the previous commit and the latest
Listing 1.9. Diffstat format
Listing 1.10. Word diff format
Listing 1.11. Parsing refs
Chapter 2. Remote Git
Listing 2.1. Output: creating a remote repository
Listing 2.2. Output: pushing and setting an upstream branch
Listing 2.3. Output: cloning a remote repository
Listing 2.4. Output: remote repository
Listing 2.5. Output: pulling new changes
Listing 2.6. Output: fetching new changes
Listing 2.7. Output: pull after fetch
Listing 2.8. Output: listing branches
Listing 2.9. Output: pushing and setting an upstream branch
Listing 2.10. Output: merging a branch
Listing 2.11. Merge conflict in Git
Listing 2.12. Output: deleting a remote branch
Chapter 3. Filesystem interactions
Listing 3.1. Output: renamed commit
Listing 3.2. Output: removed commit
Listing 3.3. Output: hard reset
Listing 3.4. Output: force-cleaned files
Listing 3.5. Output: ignore file commit
Listing 3.6. Output: trying to add an ignored file
Listing 3.7. Output: force-cleaning ignored files
Listing 3.8. Output: stashing uncommitted changes
Listing 3.9. List of stashes
Listing 3.10. Output: reapplying stashed changes