Shape Shape point chapter-list Group Group Group Group Group Shape Copy 12 Shape Shape Copy 3 Shape Shape dropdown editor editor Combined Shape grid Shape Copy 4 Shape Copy 7 Shape language language Shape megaphone paperback Shape platform noun_419259-2 copy play-icon Group BS-Question-Rounded-Circle quotes noun_610406 stacked-books-1 stacked-books-2 Group Group Group Group Group Group Group Group Group Path
Sale

Mastering Git

$49.99 $59.99 4.4/5 7 reviews · Write a Review

The book that teaches you the foundations of the much-used but oft-misunderstood Git! Learn how Git works under the hood, how to set up your own repos, as well as how to deal with remote syncing. Master workflows, branching, merging and rebasing your work for easy and successful project collaboration!

Developer Guide

Beginner

For Beginner Developers

Learn and Master Git!

Chances are if you're involved with software development you've heard of and have used Git at some point in your life. Version control systems are critical for any successful collaborative software project. Git is both simple to start using and accommodating for the most complex tasks with version control. Even seasoned Git users hit roadblocks on how to handle common situations.

Mastering Git is here to help! This book is the easiest and fastest way to get hands-on experience with using Git for version control of your projects.

Who This Book Is For

This book is for anyone who would like to leverage the power of version control with Git in their software development process. The book starts with a gentle introduction, then moves on to more complicated scenarios, including merge conflicts, rebasing and more.

Topics Covered in Mastering Git

  • Crash course in Git: All of the basics of Git that every software craftsman should know. Understand how to set up Git, committing, ignoring files, etc.
  • Branching/Merging/Pushing: The whole point of Git is collaboration and this covers everything to work with others.
  • How Git actually works: After using Git for a while it's good to discover the whys behind all of the things.
  • Rebasing: Rebasing and squashing doesn’t have to be scary; it’s quite a useful and advanced way of merging code to support your collaborative workflow.
  • Undoing what you’ve done: Most frustration with Git comes from not being able to undo something that you’ve screwed up. But Git has lots of ways you can go back and recover from a weird merge or commit state.
  • Workflows in Git: Working with Git requires some rules to make sure things go smoothly across development teams. Learn the most common workflows and how to decide which one to use.

One thing you can count on: after reading this book, you'll be well-prepared to use Git in your own software development workflow!

Table of Contents

Section I: Beginning Git

1.

A Crash Course in Git - New

Learn how to get started with Git, the differences between platforms, and a quick overview of the typical Git workflow.

2.

Cloning a Repo

It’s quite common to start by creating a copy of somebody else's repository. Discover how to clone a remote repo to your local machine, and what constitutes "forking" a repository.

3.

Committing Your Changes

A Git repo is made up of a sequence of commits—each representing the state of your code at a point in time. Discover how to create these commits to track the changes you make in your code.

4.

The Staging Area

Before you can create a Git commit, you have to use the “add” command. What does it do? Discover how to use the staging area to great effect through the interactive git add command.

5.

Ignoring Files in Git

Sometimes, there are things that you really don’t want to store in your source code repository.

6.

Git Log & History

There’s very little point in creating a nice history of your source code if you can’t explore it. You’ll discover the versatility of the git log command—displaying branches, graphs and even filtering the history.

7.

Branching

The real power in Git comes from its branching and merging model. This allows you to work on multiple things simultaneously. Discover how to manage branches, and exactly what they are in this chapter.

8.

Syncing With a Remote

You’ve been working hard on your local copy of the Git repository, and now you want to share this with your friends. See how you can share through using remotes, and how you can use multiple remotes at the same time.

9.

Creating a Repository

If you are starting a new project, and want to use Git for source control, you first need to create a new repository.

10.

Merging

Branches in Git without merging would be like basketball without the hoop—fun, sure, but with very little point. In this chapter you’ll learn how you can use merging to combine the work on multiple branches back into one.

Section II: Advanced Git

11.

How Does Git Actually Work?

If you've been using Git for a while, you might be wondering how it actually works. Discover how Git is built on top of a simple key-value store-based file system, and what power this provides to you.

12.

Merge Conflicts

Merging isn't always as simple as it might first appear. In this chapter you will learn how to handle merge conflicts — which occur when Git cannot work out how to automatically combine changes.

13.

Stashes

Git stashes offer a great way for you to create a temporary snapshot of what you're working on, without having to create a full-blown commit. Discover when that might be useful, and how to go about it.

14.

Demystifying Rebasing

Rebasing is poorly understood, although it can be an incredibly powerful tool. In this chapter, we’ll cover what happens behind the scenes when you rebase and set you up for some useful applications of rebasing in the coming chapters.

15.

Rebasing to Rewrite History

Rebase is a whole lot more powerful than just as a replacement for merge. It offers the ability to completely rewrite the history of your git repo.

16.

Gitignore After the Fact

Gitignore is easy right? If you've been using it for a while you'll know that isn't always true. Discover how you can fix problems with gitignore such as handling files that have been accidentally committed to the repository.

17.

The Many Faces of Undo

One of the common questions associated with git is "how can I get out of this mess?" In this chapter you'll learn about the different "undo" commands that git provides — what they are and when to use them.

Section III: Git Workflows

18.

Centralized Workflow

This model means you work in master all the time. Although this might seem terrifying, it actually works rather well for small teams with infrequent commits.

19.

Feature Branch Workflow - New

Feature branches are used to create new features in your code and then merged to master when they're done.

20.

Gitflow Workflow - New

A popular method to manage your team’s development workflow. In fact, there are even plugins for IDEs that support this Git workflow.

21.

Forking Workflow - New

Not all teams have to work out of a single online repository with local clones. When you work at the scale of open-source projects, making each contributor work out of their own fork can be quite advantageous.

22.

Appendix: Installing and Configuring Git - New

Installing Git is relatively straightforward, but putting a little care in your initial setup and configuration will go a long way to ensuring that your work with Git is as hassle-free as possible.

Meet the Team

Average Rating

4.4 /5

Leave a review for this product

7 reviews

Mastering Git

The book that teaches you the foundations of the much-used but oft-misunderstood Git! Learn how Git works under the hood, how to set up your own repos, as well as how to deal with remote syncing. Master workflows, branching, merging and rebasing your work for easy and successful project collaboration!

Top