Setting up a git (ssh) server using OS X Server
You need to create a "bare" git repo: a repository that can never have files checked out. Everyone pulls and pushes from the server like normal, but nobody can actually work on the server (unless they make a non-bare clone).

If you are creating a new repository called "my_bare_repo.git", you can make it bare like so:

cd /Users/git (or whatever)
git init --bare my_bare_repo.git


Using your git server

On the client machine, you would clone the repo like so:

git clone ssh://user@yourmachine.domain.com/Users/git/my_bare_repo.git


If you have an existing local repo, you can add a remote origin like so:

git remote add origin ssh://user@yourmachine.domain.com/Users/git/my_bare_repo.git


Then use the server app to set up "sharing only" users that can use ssh services. You can manage the users and profiles locally or remotely through web and/or server app. The ssh access is controlled in the Server entry in the top left - then click on Settings on the right and select SSH.