How it works...

The normal and bare repositories are pretty similar, only the mirror one sticks out. This is due to the refspec fetch on the mirror repository, +refs/*:refs/*, which will fetch all refs from the remote and not just refs/heads/* and refs/tags/* as a normal repository (and a bare repository) does. The many different ref namespaces on the JGit repository is because the JGit repository is managed by Gerrit Code Review. It uses different namespaces for repository-specific content, such as change branches for all commits submitted for code review, and metadata on code review score.

The mirror repositories are ideal when you would like a quick way to back up a Git repository. It ensures that you have everything included without the ...

Get Git Version Control Cookbook 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.