Installing the Git server

The Git server manages all files stored in version control. Unlike Git client computers, the Git server is a bare repository that doesn't have its own working directory for performing file modifications. This topic describes how to install and configure a Git server in a Windows folder that is shared with other Windows-based computers connected to the same local area network. For information about how to install Git on a non-Windows computer, see Getting Git on a Server.

Note   If you're using an external Git service to host your files, rather than a networked computer, you don't need to install and configure the Git server. Instead, you only need to create a Git repository with your chosen service. For example, see Creating a new repository for information about how to create a repository on github.com.

To install the Git server on a Windows-based computer

  1. On the computer on which you want to host the Git server, download the latest version of Git for Windows from git.scm.com.
  2. Run the installer to install the Git software.

Tip   When installing, use the default installer options.

  1. After installation is complete, in Windows File Explorer, create the directory in which you want to add one or more Git repositories.
  2. Share the directory on your network, and give all users who will contribute to the repository Read/Write access.
  3. Right-click the directory, and then click Git Bash Here on the shortcut menu.

The Git command prompt opens, with its working directory set to the selected directory.

  1. Type the command:

git init your_repository_name.git --bare

where your_repository_name is the name of the Git repository that you want to create to store documentation files.

Note   As a best practice, use a short repository name without any spaces (for example, docrepo). This makes the repository easy to access in command-line operations.

You have now created the Git server. You are now ready to install the Git software on one or more writers' computers and add files to the repository.