O'Reilly logo
live online training icon Live Online training

Next Level Git - Master your workflow

Use Git to find problems, simplify working with multiple branches and repositories, and customize behavior with hooks

Topic: Software Development
Brent Laster

If you're doing anything with open source these days, the chances are very high that you are working with Git. Many know enough basic Git operations to get started but haven’t found the time (or even know where to look) to learn about Git’s advanced functionality. Git has an immense collection of power operations and techniques that can help you simplify your development process and deal with the challenges that today’s multibranch and multirepository projects often engender.

Brent Laster explains how to take your Git skills to the next level, covering useful techniques—some which have existed in Git for years and some which were included in very recent versions—for managing your source code more easily than ever before. In part one of this three-hour hands-on training, Brent helps you master subtrees, worktrees, submodules, and hooks. Don’t spend time reinventing the wheel or working around Git. Join in to learn how Git can help you be more productive and simplify your workflow more than you ever thought possible.

What you'll learn-and how you can apply it

By the end of this live, online course, you’ll understand:

  • Git core concepts and design
  • How to use subtrees, worktrees, submodules, and hooks to simplify source code management and related workflows

And you’ll be able to:

  • Use advanced Git functionality to manage source code
  • Increase productivity and simplify development workflows

This training course is for you because...

  • You’re a developer who needs a powerful source management tool that doesn’t get in the way.
  • You’re a manager or project manager who wants to understand how to access and examine code in a Git repository.
  • You’re a tester who wants a way to easily manage your tests in source control.


  • A working knowledge of source control concepts
  • Experience using at least one source control system

Required materials and setup:

  • A machine with Git (http://git-scm.org) installed (Ensure that you can run Git from the command line by opening a terminal or emulator session and typing “git --version”. This should return the current version for the revision of Git that you have installed.)
  • A GitHub account (free is fine)

About your instructor

  • Brent Laster is a global trainer, author, and speaker on open source technologies as well as an R&D director at a top technology company. He’s been involved in the software industry for more than 25 years, holding various technical and management positions. Brent has always tried to make time to learn and develop both technical and leadership skills and share them with others. He believes that regardless of the topic or technology, there’s no substitute for the excitement and sense of potential that come from providing others with the knowledge they need to accomplish their goals.


The timeframes are only estimates and may vary according to how the class is progressing

Git core concepts (30 minutes)

  • Lecture: Overview of key Git concepts—distributed versus centralized source management, the Git promotion model, and merging and rebasing

Useful commands for retrieving previous content (20 minutes)

  • Lecture: Overview and use cases for Git commands for retrieving previous content —stash, reset, and revert

Break (10 minutes)

Worktrees (20 minutes)

  • Lecture: Creating and working with worktrees in Git to allow for parallel work on different branches; options; use cases; examples
  • Hands-on exercise: Use worktrees to simplify working on multiple branches at the same time

Submodules (35 minutes)

  • Lecture: What submodules are; how they relate to other Git projects; how to update them; their benefits; how to keep them in sync
  • Hands-on exercise: Create, update, and maintain submodules in Git

Break (10 minutes)

Subtrees (30 minutes)

  • Lecture: What subtrees are and how they differ from submodules; how to add subtrees to a project, update them, and merge them; the difference between subtrees and the subtree merge strategy in Git; how to use the subtree functionality to create a new project from split content
  • Hands-on exercise: Create, update, and maintain subtrees in Git

Customizing and extending Git’s functionality with hooks (25 minutes)

  • Lecture: The different types of hooks that Git supports; how they can be invoked and leveraged; examples of hooks written in different programming languages
  • Hands-on exercise: Create a simple Git hook, install it, and explore it in action