Chapter 11. Hosting a repository

 

This chapter covers

  • Creating a repository in a format for hosting a server
  • Mirroring an existing repository for hosting a server
  • Sharing a repository with a local network
  • Viewing a repository in a web browser
  • Providing advanced Git hosting with other software

You saw in technique 6 how to push to remote repositories, provided by various organizations on the internet, as a way of sharing your Git repositories with others. Sometimes, though, you may wish to host a remote Git repository on a machine you control—for example, to

  • Temporarily share a Git repository on your machine with another computer on the same network
  • Keep a full backup of an external Git repository on a server you control
  • Provide an internal mirror of an external Git repository to allow faster transfer speeds
  • Host a Git repository on a server entirely under your own control

Technique 63 Initializing a local repository in a server hosting - format: git init --bare

Technique 64 Mirroring a repository: git clone --mirror

Technique 65 Sharing a repository with other users on the same ne- etwork: git daemon

Technique 66 Displaying a repository in a browser: git instaweb

11.1. Advanced Git hosting

11.2. Summary