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 command and how the filter-branch command can be used to rewrite the history of a repository. Finally, we'll take a quick look on how to integrate other git projects as subprojects in a git repository with either the submodule functionallity or the subtree strategy.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset