Chapter 9. Repository Maintenance

In this chapter, we will cover the following topics:

  • Pruning remote branches
  • Running garbage collection manually
  • Turning off automatic garbage collection
  • Splitting a repository
  • Rewriting history – changing a single file
  • Creating a backup of your repositories as mirror repositories
  • A quick submodule how-to
  • Subtree merging
  • Submodule versus subtree merging

Introduction

In this chapter, we'll take a look at the various tools for repository maintenance. We will look at how we can easily delete branches in the local repository that have been deleted from the remote repository. We'll also see how we can trigger garbage collection and how to turn it off. We will take a look at how a repository can be split with the filter-branch ...

Get Git: Mastering Version Control now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.