Git: Mastering Version Control

Learn everything you need to take full control of your workflow with Git with this curated Learning Path – dive in and transform the way you work
Preview in Mapt

Git: Mastering Version Control

Ferdinando Santacroce et al.

3 customer reviews
Learn everything you need to take full control of your workflow with Git with this curated Learning Path – dive in and transform the way you work
Mapt Subscription
FREE
$29.99/m after trial
eBook
$10.00
RRP $69.99
Save 85%
What do I get with a Mapt Pro subscription?
  • Unlimited access to all Packt’s 5,000+ eBooks and Videos
  • Early Access content, Progress Tracking, and Assessments
  • 1 Free eBook or Video to download and keep every month after trial
What do I get with an eBook?
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with Print & eBook?
  • Get a paperback copy of the book delivered to you
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with a Video?
  • Download this Video course in MP4 format
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
$0.00
$10.00
$29.99 p/m after trial
RRP $69.99
Subscription
eBook
Start 30 Day Trial

Frequently bought together


Git: Mastering Version Control Book Cover
Git: Mastering Version Control
$ 69.99
$ 10.00
Mastering Machine Learning Algorithms Book Cover
Mastering Machine Learning Algorithms
$ 35.99
$ 10.00
Buy 2 for $20.00
Save $85.98
Add to Cart

Book Details

ISBN 139781787123205
Paperback861 pages

Book Description

Git is one of the most popular types of Distributed Version Control System. Since its inception, it has attracted skilled developers due to its robust, powerful, and reliable features. Like most powerful tools, Git can be hard to approach for the newcomers. However, this learning path will help you overcome this fear and become adept at all the basic and advanced tasks in Git.

This course starts with an introduction to version control systems before you delve deeply into the essentials of Git. This serves as a primer for the topics to follow such as branching and merging, creating and managing a GitHub personal repository, and fork and pull requests. You'll also learn how to migrate from SVN using Git tools or TortoiseGit and migrate from other VCSs, concluding with a collection of resources, links, and appendices.

As you progress on to the next module, you will learn how you can automate the usual Git processes by utilizing the hook system built into Git. It also covers advanced repository management, including different options to rewrite the history of a Git repository before you discover how you can work offline with Git, how to track what is going on behind the scenes, and how to use the stash for different purposes.

Moving forward, you will gain deeper insights into Git's architecture, its underlying concepts, behavior, and best practices. It gives a quick implementation example of using Git for a collaborative development of a sample project to establish the foundation knowledge of Git operational tasks and concepts. By exploring advanced Git practices, you will attain a deeper understanding of Git’s behavior, allowing you to customize and extend existing recipes and write your own.

This Learning Path is a blend of content, all packaged up keeping your journey in mind. It includes content from the following Packt products:

Table of Contents

Chapter 1: Getting Started with Git
Installing Git
Running our first Git command
Summary
Chapter 2: Git Fundamentals – Working Locally
Repository structure and file status life cycle
Working with repositories
Viewing the history
Taking another way – Git branching
Stashing
Summary
Chapter 3: Git Fundamentals – Working Remotely
Working with remotes
Summary
Chapter 4: Git Fundamentals – Niche Concepts, Configurations, and Commands
Dissecting the Git configuration
Git aliases
Git references
World-wide techniques
Tricks
Summary
Chapter 5: Obtaining the Most – Good Commits and Workflows
The art of committing
Adopting a workflow – a wise act
Summary
Chapter 6: Migrating to Git
Before starting
Working on a Subversion repository using Git
Using Git with a Subversion repository
Migrating a Subversion repository
Comparing Git and Subversion commands
Summary
Chapter 7: Git Resources
Git GUI clients
Building up a personal Git server with web interface
Learning Git in a visual manner
Git on the Internet
Summary
Chapter 8: Navigating Git
Introduction
Git's objects
The three stages
Viewing the DAG
Extracting fixed issues
Getting a list of the changed files
Viewing history with Gitk
Finding commits in history
Searching through history code
Chapter 9: Configuration
Configuration targets
Querying the existing configuration
Templates
A .git directory template
A few configuration examples
Git aliases
The refspec exemplified
Chapter 10: Branching, Merging, and Options
Introduction
Managing your local branches
Branches with remotes
Forcing a merge commit
Using git rerere to merge known conflicts
The difference between branches
Chapter 11: Rebase Regularly and Interactively, and Other Use Cases
Introduction
Rebasing commits to another branch
Continuing a rebase with merge conflicts
Rebasing selective commits interactively
Squashing commits using an interactive rebase
Changing the author of commits using a rebase
Auto-squashing commits
Chapter 12: Storing Additional Information in Your Repository
Introduction
Adding your first Git note
Separating notes by category
Retrieving notes from the remote repository
Pushing notes to a remote repository
Tagging commits in the repository
Chapter 13: Extracting Data from the Repository
Introduction
Extracting the top contributor
Finding bottlenecks in the source tree
Grepping the commit messages
The contents of the releases
Chapter 14: Enhancing Your Daily Work with Git Hooks, Aliases, and Scripts
Introduction
Using a branch description in the commit message
Creating a dynamic commit message template
Using external information in the commit message
Preventing the push of specific commits
Configuring and using Git aliases
Configuring and using Git scripts
Setting up and using a commit template
Chapter 15: Recovering from Mistakes
Introduction
Undo – remove a commit completely
Undo – remove a commit and retain the changes to files
Undo – remove a commit and retain the changes in the staging area
Undo – working with a dirty area
Redo – recreate the latest commit with new changes
Revert – undo the changes introduced by a commit
Reverting a merge
Viewing past Git actions with git reflog
Finding lost changes with git fsck
Chapter 16: Repository Maintenance
Introduction
Pruning remote branches
Running garbage collection manually
Turning off automatic garbage collection
Splitting a repository
Rewriting history – changing a single file
Back up your repositories as mirror repositories
A quick submodule how-to
Subtree merging
Submodule versus subtree merging
Chapter 17: Patching and Offline Sharing
Introduction
Creating patches
Creating patches from branches
Applying patches
Sending patches
Creating Git bundles
Using a Git bundle
Creating archives from a tree
Chapter 18: Git Plumbing and Attributes
Introduction
Displaying the repository information
Displaying the tree information
Displaying the file information
Writing a blob object to the database
Writing a tree object to the database
Writing a commit object to the database
Keyword expansion with attribute filters
Metadata diff of binary files
Storing binaries elsewhere
Checking the attributes of a file
Attributes to export an archive
Chapter 19: Tips and Tricks
Introduction
Using git stash
Saving and applying stashes
Debugging with git bisect
Using the blame command
Color UI in the prompt
Autocompletion
Bash prompt with status information
More aliases
Interactive add
Interactive add with Git GUI
Ignoring files
Showing and cleaning ignored files
Chapter 20: Git Basics in Practice
An introduction to version control and Git
Git by example
Summary
Chapter 21: Exploring Project History
Directed Acyclic Graphs
Single revision selection
Selecting the revision range
Searching history
History of a file
Finding bugs with git bisect
Selecting and formatting the git log output
Summary
Chapter 22: Developing with Git
Creating a new commit
Working with branches
Summary
Chapter 23: Managing Your Worktree
Ignoring files
File attributes
Fixing mistakes with the reset command
Stashing away your changes
Managing worktrees and the staging area
Multiple working directories
Summary
Chapter 24: Collaborative Development with Git
Collaborative workflows
Managing remote repositories
Transport protocols
Publishing your changes upstream
Chain of trust
Summary
Chapter 25: Advanced Branching Techniques
Types and purposes of branches
Branching workflows and release engineering
Interacting with branches in remote repositories
Summary
Chapter 26: Merging Changes Together
Methods of combining changes
Resolving merge conflicts
Summary
Chapter 27: Keeping History Clean
An introduction to Git internals
Rewriting history
Amending history without rewriting
Summary
Chapter 28: Managing Subprojects – Building a Living Framework
Managing library and framework dependencies
Managing large Git repositories
Summary
Chapter 29: Customizing and Extending Git
Git on the command line
Graphical interfaces
Configuring Git
Automating Git with hooks
Extending Git
Summary
Chapter 30: Git Administration
Repository maintenance
Data recovery and troubleshooting
Git on the server
Augmenting development workflows
Summary
Chapter 31: Git Best Practices
Starting a project
Working on a project
Integrating changes
Other recommendations
Summary

What You Will Learn

  • Transport your work to a remote repository in a centralized manner
  • Experiment with your code without affecting functional code files
  • Explore some tools used to migrate to Git from other versioning systems without losing your development history
  • Understand the Git data model and how you can navigate the database with simple commands
  • Debug with Git and use various techniques to find faulty commits
  • Customize Git behavior system-wide, on a per-user, per-repository, and per-file basis
  • Master administering and setting up Git repositories, configuring access, finding and recovering from repository errors, and performing repository maintenance
  • Chose a workflow and configure/set up support for the chosen workflow

Authors

Table of Contents

Chapter 1: Getting Started with Git
Installing Git
Running our first Git command
Summary
Chapter 2: Git Fundamentals – Working Locally
Repository structure and file status life cycle
Working with repositories
Viewing the history
Taking another way – Git branching
Stashing
Summary
Chapter 3: Git Fundamentals – Working Remotely
Working with remotes
Summary
Chapter 4: Git Fundamentals – Niche Concepts, Configurations, and Commands
Dissecting the Git configuration
Git aliases
Git references
World-wide techniques
Tricks
Summary
Chapter 5: Obtaining the Most – Good Commits and Workflows
The art of committing
Adopting a workflow – a wise act
Summary
Chapter 6: Migrating to Git
Before starting
Working on a Subversion repository using Git
Using Git with a Subversion repository
Migrating a Subversion repository
Comparing Git and Subversion commands
Summary
Chapter 7: Git Resources
Git GUI clients
Building up a personal Git server with web interface
Learning Git in a visual manner
Git on the Internet
Summary
Chapter 8: Navigating Git
Introduction
Git's objects
The three stages
Viewing the DAG
Extracting fixed issues
Getting a list of the changed files
Viewing history with Gitk
Finding commits in history
Searching through history code
Chapter 9: Configuration
Configuration targets
Querying the existing configuration
Templates
A .git directory template
A few configuration examples
Git aliases
The refspec exemplified
Chapter 10: Branching, Merging, and Options
Introduction
Managing your local branches
Branches with remotes
Forcing a merge commit
Using git rerere to merge known conflicts
The difference between branches
Chapter 11: Rebase Regularly and Interactively, and Other Use Cases
Introduction
Rebasing commits to another branch
Continuing a rebase with merge conflicts
Rebasing selective commits interactively
Squashing commits using an interactive rebase
Changing the author of commits using a rebase
Auto-squashing commits
Chapter 12: Storing Additional Information in Your Repository
Introduction
Adding your first Git note
Separating notes by category
Retrieving notes from the remote repository
Pushing notes to a remote repository
Tagging commits in the repository
Chapter 13: Extracting Data from the Repository
Introduction
Extracting the top contributor
Finding bottlenecks in the source tree
Grepping the commit messages
The contents of the releases
Chapter 14: Enhancing Your Daily Work with Git Hooks, Aliases, and Scripts
Introduction
Using a branch description in the commit message
Creating a dynamic commit message template
Using external information in the commit message
Preventing the push of specific commits
Configuring and using Git aliases
Configuring and using Git scripts
Setting up and using a commit template
Chapter 15: Recovering from Mistakes
Introduction
Undo – remove a commit completely
Undo – remove a commit and retain the changes to files
Undo – remove a commit and retain the changes in the staging area
Undo – working with a dirty area
Redo – recreate the latest commit with new changes
Revert – undo the changes introduced by a commit
Reverting a merge
Viewing past Git actions with git reflog
Finding lost changes with git fsck
Chapter 16: Repository Maintenance
Introduction
Pruning remote branches
Running garbage collection manually
Turning off automatic garbage collection
Splitting a repository
Rewriting history – changing a single file
Back up your repositories as mirror repositories
A quick submodule how-to
Subtree merging
Submodule versus subtree merging
Chapter 17: Patching and Offline Sharing
Introduction
Creating patches
Creating patches from branches
Applying patches
Sending patches
Creating Git bundles
Using a Git bundle
Creating archives from a tree
Chapter 18: Git Plumbing and Attributes
Introduction
Displaying the repository information
Displaying the tree information
Displaying the file information
Writing a blob object to the database
Writing a tree object to the database
Writing a commit object to the database
Keyword expansion with attribute filters
Metadata diff of binary files
Storing binaries elsewhere
Checking the attributes of a file
Attributes to export an archive
Chapter 19: Tips and Tricks
Introduction
Using git stash
Saving and applying stashes
Debugging with git bisect
Using the blame command
Color UI in the prompt
Autocompletion
Bash prompt with status information
More aliases
Interactive add
Interactive add with Git GUI
Ignoring files
Showing and cleaning ignored files
Chapter 20: Git Basics in Practice
An introduction to version control and Git
Git by example
Summary
Chapter 21: Exploring Project History
Directed Acyclic Graphs
Single revision selection
Selecting the revision range
Searching history
History of a file
Finding bugs with git bisect
Selecting and formatting the git log output
Summary
Chapter 22: Developing with Git
Creating a new commit
Working with branches
Summary
Chapter 23: Managing Your Worktree
Ignoring files
File attributes
Fixing mistakes with the reset command
Stashing away your changes
Managing worktrees and the staging area
Multiple working directories
Summary
Chapter 24: Collaborative Development with Git
Collaborative workflows
Managing remote repositories
Transport protocols
Publishing your changes upstream
Chain of trust
Summary
Chapter 25: Advanced Branching Techniques
Types and purposes of branches
Branching workflows and release engineering
Interacting with branches in remote repositories
Summary
Chapter 26: Merging Changes Together
Methods of combining changes
Resolving merge conflicts
Summary
Chapter 27: Keeping History Clean
An introduction to Git internals
Rewriting history
Amending history without rewriting
Summary
Chapter 28: Managing Subprojects – Building a Living Framework
Managing library and framework dependencies
Managing large Git repositories
Summary
Chapter 29: Customizing and Extending Git
Git on the command line
Graphical interfaces
Configuring Git
Automating Git with hooks
Extending Git
Summary
Chapter 30: Git Administration
Repository maintenance
Data recovery and troubleshooting
Git on the server
Augmenting development workflows
Summary
Chapter 31: Git Best Practices
Starting a project
Working on a project
Integrating changes
Other recommendations
Summary

Book Details

ISBN 139781787123205
Paperback861 pages
Read More
From 3 reviews

Read More Reviews

Recommended for You

Git Version Control Cookbook Book Cover
Git Version Control Cookbook
$ 26.99
$ 10.00
Mastering Object-oriented Python Book Cover
Mastering Object-oriented Python
$ 26.99
$ 10.00
Linux: Powerful Server Administration Book Cover
Linux: Powerful Server Administration
$ 79.99
$ 10.00
Learning DevOps: Continuously Deliver Better Software Book Cover
Learning DevOps: Continuously Deliver Better Software
$ 67.99
$ 10.00
DevOps Automation Cookbook Book Cover
DevOps Automation Cookbook
$ 35.99
$ 10.00
Python: Master the Art of Design Patterns Book Cover
Python: Master the Art of Design Patterns
$ 67.99
$ 10.00