7

我查看了 StackOverflow 和其他地方(包括 Git 文档),但无法使其正常工作。这是我所做的:

设置中央存储库(在 //SomeUNC 上);

git init --bare Central.git

这将创建一个 //SomeUNC/Central.git 文件夹。

现在,在本地存储库中,我尝试:

git remote add Central //SomeUNC/Central.git (this is ok)
git push -all Central

这给出了错误:

致命:“中央”似乎不是 git 存储库
致命:远程端意外挂断

我确定我错过了一些简单的东西。感谢您的帮助!

4

1 回答 1

12

听起来您的路径无效。删除裸存储库并从本地存储库工作文件夹中尝试此操作:

git init --bare //UNC/Path/to/Central.git
git remote add Central //UNC/Path/to/Central.git
git push --all Central
于 2012-06-21T15:24:02.563 回答