In my project we don’t like each developer to have the source code on their client computer. They should just access it on their own branch folder on the server.
We need to create a repository on the server in this folder:
//172.30.12.35/d$/project
We have a branch named sam, and this developer branch folder is:
//172.30.12.35/d$/sam
We create the sam branch with:
git clone //172.30.12.35/d$/project //172.30.12.35/d$/sam
on push we got errors. like:
fatal: not a valid object name :HEAD
It sounds like you want your developers to fork the main repository, not branch.
Forking is a concept, very popular on GitHub, where developers don’t have write access to the main repository and instead do work on their own copy of it. The copy is created by cloning the repository, like in your example. The way they contribute to the main repository is by sending patches, or pull requests in GitHub’s terms, that are merged in main code base.
Branching in Git does not involve separate copy of the repository, like it does for example in subversion, but rather is an entity within the repository itself. You can think of it as a label pointing to the latest of a series of successive commits.