Advance your understanding of how Git works under the hood, master workflows, branching, merging and rebasing your work for easy and successful project collaboration!
Author(s): Jawwad Ahmad, Chris Belanger
Edition: 2
Publisher: raywenderlich.com
Year: 2021
Language: English
Pages: 226
Tags: git; version control; it;
Book License
What You Need
Book Source Code & Forums
About the Authors
About the Editors
Introduction
Enter the video courses
How to read this book
Section I: Advanced Git
Section II: Workflows
Chapter 1: How Does Git Actually Work?
Everything is a hash
The inner workings of Git
The Git object repository structure
Viewing Git objects
Key points
Where to go from here?
Chapter 2: Merge Conflicts
What is a merge conflict?
Handling your first merge conflict
Merging from another branch
Understanding Git conflict markers
Resolving merge conflicts
Editing conflicts
Completing the merge operation
Challenge: Resolve another merge conflict
Key points
Where to go from here?
Chapter 3: Stashes
Introducing git stash
Retrieving stashes
Popping stashes
Applying stashes
Merge conflicts with stashes
Challenge: Clean up the remaining stash
Key points
Where to go from here?
Chapter 4: Demystifying Rebasing
Why would you rebase?
What is rebasing?
Creating your first rebase operation
A more complex rebase
Resolving errors
Orphaned commits
Merging vs rebasing
Challenge: Rebase on top of another branch
Key points
Chapter 5: Rebasing to Rewrite History
Reordering commits
Interactive rebasing
Squashing in an interactive rebase
Creating the squash commit message
Reordering commits
Rewording commit messages
Squashing multiple commits
Challenge 1: More squashing
Challenge 2: Rebase your changes onto main
Key points
Where to go from here?
Chapter 6: Gitignore After the Fact
Getting started
.gitignore across branches
How Git tracking works
Updating the index manually
Removing files from the index
Rebasing isn’t always the solution
Using filter-branch to rewrite history
Challenge: Remove IGNORE_ME from the repository
Key points
Where to go from here?
Chapter 7: The Many Faces of Undo
Working with git reset
Working with the three flavors of reset
Using git reflog
Finding old commits
Using git revert
Key points
Where to go from here?
Chapter 8: Centralized Workflow
When to use the centralized workflow
Centralized workflow best practices
Getting started
Key points
Chapter 9: Feature Branch Workflow
When to use the Feature Branch workflow
Getting started
Merging the feature branches into main
Key points
Chapter 10: Gitflow Workflow
When to use Gitflow
Chapter roadmap
Types of Gitflow branches
Installing git-flow
Initializing git-flow
Key points
Chapter 11: Forking Workflow
Getting started
A fork is simply a clone
Exploring the code
Fixing the custom divisors bug
Opening a pull request
Rewinding your main branch
Updating your fork via GitHub
Updating your fork using an upstream remote
Fetching changes from other forks
Key points
Conclusion