We\'re in the process of migrating from Mercurial to Git for our workflow and I have two minor issues.
First, is it possible to \"clone\" a local repository directly
I also ran into this issue recently and solved it as follows:
On remote server:
1: Create a directory named /tmp/bare
2: Change to that directory
3: Execute git init --bare
On local machine:
1: Change to your git project directory
2: git remote add bare ssh://user@server/tmp/bare
3: git push --all bare
4: git remote remove bare
On remote server:
1: git clone /tmp/bare /path/to/your/clone
On local machine:
1: git remote add origin ssh://user@server/path/to/your/clone
This is a little involved, but it works and does not require setting any weird flags or instructing git to override its default behaviours. It is hence quite safe.