Book description
This book teaches Git in a simple, visual, and tangible manner so that you can build a solid mental model of how Git version control works. Through the use of color, storytelling, and hands-on exercises, you will learn to use this tool with confidence.
The information is introduced incrementally so that you don't get bogged down with unknown terms or concepts. Learning Git is ideal for anyone who needs to use Git for personal or professional projects: coding bootcamp students, junior developers, data professionals, and technical writers, to name just a few!
This book covers how to:
- Download Git and initialize a local repository
- Add files to the staging area and make commits
- Create, switch, and delete branches
- Merge and rebase branches
- Work with remote repositories including cloning, pushing, pulling, and fetching
- Use pull requests to collaborate with others
Publisher resources
Table of contents
- [ Preface ]
-
Chapter 1. Git and the Command Line
- What Is Git?
- The Graphical User Interface and the Command Line
- Opening a Command Line Window
- Executing Commands in the Command Line
- Installing Git
- Command Options and Arguments
- Clearing the Command Line
- Opening the Filesystem Window
- Working with Directories
- Closing the Command Line
- Setting Git Configurations
- Preparing a Text Editor
- Integrated Terminals
- Summary
- Chapter 2. Local Repositories
- Chapter 3. Making a Commit
- Chapter 4. Branches
- Chapter 5. Merging
- Chapter 6. Hosting Services and Authentication
- Chapter 7. Creating and Pushing to a Remote Repository
- Chapter 8. Cloning and Fetching
-
Chapter 9. Three-Way Merges
- State of the Local and Remote Repositories
- Why Are Three-Way Merges Important?
- Setting Up a Three-Way Merge Scenario
- Defining Upstream Branches
- Editing the Same File Multiple Times Between Commits
- Working at the Same Time as Others on Different Files
- Three-Way Merge in Practice
- Pulling Changes from a Remote Repository
- State of the Local and Remote Repositories
- Summary
-
Chapter 10. Merge Conflicts
- State of the Local and Remote Repositories
- Introducing Merge Conflicts
- How to Resolve Merge Conflicts
- Setting Up a Merge Conflict Scenario
- The Merge Conflict Resolution Process
- Resolving Merge Conflicts in Practice
- Staying Up to Date with a Remote Repository
- Syncing the Repositories
- State of the Local and Remote Repositories
- Summary
-
Chapter 11. Rebasing
- State of the Local and Remote Repositories
- Integrating Changes in Git
- Why Is Rebasing Helpful?
- Setting Up the Rebasing Example
- Unstaging and Staging Files
- Preparing to Rebase
- The Five Stages of the Rebase Process
- Rebasing and Merge Conflicts
- Rebasing a Branch in Practice
- The Golden Rule of Rebasing
- Syncing the Repositories
- State of the Local and Remote Repositories
- Summary
-
Chapter 12. Pull Requests (Merge Requests)
- State of the Local and Remote Repositories
- Introducing Pull Requests
- Hosting Service Specifics
- Why Use Pull Requests?
- Understanding How Pull Requests Are Merged
- Preparing to Make a Pull Request
- An Easier Way to Define Upstream Branches
- Creating a Pull Request on a Hosting Service
- Reviewing and Approving a Pull Request
- Merging a Pull Request
- Deleting Remote Branches
- Syncing the Local Repositories and Cleaning Up
- State of the Local and Remote Repositories
- Summary
- [ Epilogue ]
- Appendix A: Chapter Prerequisites
- Appendix B: Command Quick Reference
- Appendix C: Visual Language Reference
- [ Index ]
Product information
- Title: Learning Git
- Author(s):
- Release date: May 2023
- Publisher(s): O'Reilly Media, Inc.
- ISBN: 9781098133917
You might also like
book
Head First Git
What will you learn from this book? Many people who use Git rely on "recipes"--copying and …
book
Learning Go
Go is rapidly becoming the preferred language for building web services. While there are plenty of …
video
Complete Git Guide: Understand and Master Git and GitHub
Complete with practical activities, this comprehensive Git and GitHub guide will help you understand how Git …
book
Learning GitHub Actions
Automate your software development processes with GitHub Actions, the continuous integration and continuous delivery platform that …