How do i create a local bare repository with tortoisegit?
Greg's comment help me understand tortoisegit push successfully, but no n开发者_JAVA百科ew files?
How do I create a local bare repository with tortoisegit?
I can right click and clone a repository from github and push. I would like to create a local repository then do the same thing, clone and push. How do I do that?
-edit- I have created a local repository just fine but I can't push to it. I need to pull everything. I like the consistency of pushing in both my projects.
Create an empty directory in explorer and then open the context menu. Select "Git -> Create repository here..." and check "Make it Bare".
The "Make it Bare" will be checked automatically when that folder is named something like "XXX.git".
Update: this feature, tracked by tortoisegit issues 220, was fixed in Q4 2010, and is now part of the TortoiseGit documentation with the "Make it Bare" option:
(Source: "Getting started with Git on Windows" by Darran Jones)
Original answer (2009)
You can create it manually (see Git FAQ), but Issue 220 (November 2009, still opened in May 2010) mentions that TortoiseGit does not yet support that option.
So for now, it is:
$ mv repo/.git repo.git
$ git --git-dir=repo.git config core.bare true
$ rm -rf repo
or
$ ssh to remote server
$ git clone --bare -l <path_to_repos> <new_dir>
* renamed old repository directory
* renamed new repository dir to what old repository used to be.
精彩评论