Git Client & Server Intranet Configuration How-To


Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency. There are websites like github and bitbucket that host repositories but you can also have your own local repository on your intranet quite easily and for free. Below are the instructions for setting up a Git Client and Git Server on networked Windows 7 machines.

Git Server Setup

1. Install Windows 7 32-bit or 64-bit. Set computer name to gitserver. Set IP address to 20.0.0.1.
2. Create user accounts for each git user. All should have administrator privileges.
3. Log on with an administrator account.
4. Right click Windows Explorer icon and select "run as administrator".
5. Create repository directory "c:\repositories".
6. Share repositories directory. Right click "repositories" then "properties"" then "sharing" then "advanced sharing" then click "share this folder".
7. Make sure all users have permissions to use the repositories directory.
8. Download Git for Windows (aka Git Bash): https://git-scm.com/download/win
9. Install Git for Windows (use default configration options during installation).
10. Open Git Bash.
11. Navigate to the repositories directory ("cd /c/repositories"").
12. Create a bare repository ("git init foo_project --bare").

Git Client Setup

1. Install Windows 7 32-bit or 64-bit. Set IP address to 20.0.0.2.
2. Download Git for Windows (aka Git Bash): https://git-scm.com/download/win
2. Install Git for Windows (use default configuration options during installation).
3. Log on with an administrator account.
4. Right click Windows Explorer icon and select "run as administrator".
5. Map network drive as G:, type in "\\gitserver\repositories". Use the same credentials as the user account you setup on the Git server.
6. Open Git Bash.
7. Navigate to where you want to store your working copy repository ("mkdir /c/dev" then "cd /c/dev").
8. Create a Git repository ("git init foo_project").
9. Create remote repository link ("git remote add origin file://localhost/g/foo_project").
10. Push your working copy of the repository to the Git server ("git push origin master").
11. If you want to checkout the latest copy from the Git server repository type "git clone file://localhost/g/foo_project"

Git Clone

To clone a repository as a user on the Git Server type the following:
1. Navigate to directory where you want your cloned copy to reside: "cd /c/checkouts"
2. Clone the project: "git clone file://localhost/c/repositories/foo_project"
3. Now you have a clone of the project in the "c:/checkout/foo_project" directory.