从现有本地存储库在Git中创建中央存储库(在Windows中)

rht*_*341 7 git repository

我查看了StackOverflow和其他地方(包括Git文档)并且无法让它工作.这就是我所做的:

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

git init --bare Central.git
Run Code Online (Sandbox Code Playgroud)

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

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

git remote add Central //SomeUNC/Central.git (this is ok)
git push -all Central
Run Code Online (Sandbox Code Playgroud)

这给出了错误:

致命:'中心'似乎不是一个
致命的git存储库:远程端意外挂断

我确定我错过了一些简单的事情.感谢您的帮助!

Jus*_*ᚄᚒᚔ 12

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

git init --bare //UNC/Path/to/Central.git
git remote add Central //UNC/Path/to/Central.git
git push --all Central
Run Code Online (Sandbox Code Playgroud)