Create a working copy repository

Create the bare repository

Then we have to create a bare repository on the server side. Let’s assume the user ralfwehner is the repository admin user on server side. For this step i will show two alternative ways:a) We clone the server’s repositiory on the client machine and copy it via scp up to the server:

b) We create a new empty repository on the server side and copy the developer’s repository from client machine to server (recommended when using difference git versions on server and clients):
So, first create the bare repository on server side:

Synconize local and server repositories

Push developers repository to server

To synchronize the changes checked in into the local developer’s project to the server repository:

git push

Pull or merge the server repository into developer’s one

This command synchronizes the server’s repository to the local developer’s one. By this step changes made from other developers that pushed their stuff up to the server will be merged into the local repository.

git pull . remotes/origin/master

Checkout a project from server

In git terminology the checkout of a projekt can be understood as a clone of a git repository from a server to the developer’s local machine. You can do this simply by:

Heads up for Mac OS X users as i’m, too

There is a problem using the ssh commands to connecto to the git server which can end in error messages like: ‘bash: git-upload-pack: command not found’ on some machines. I’ve found this article that describe the problem and the solution more precisely.

For short, the solution is to create the symbolic link .bashrc to the .profile file: