我有一个现有的裸Git存储库,它是从CVS导入我们的源代码和历史记录而创建的.我做了一面镜子,使用:
git clone --mirror git://aserver.adomain.com/myrepo
Run Code Online (Sandbox Code Playgroud)
然后,我想将所有分支和标签推送到我们内部的Git repo主机, 但推送似乎并没有将裸存储库视为Git仓库.
我尝试过以下方法:
git clone --mirror git://aserver.adomain.com/myrepo
git remote set-url origin http://user@anotherserver.adomain.com/project/myrepo.git
git push origin
Run Code Online (Sandbox Code Playgroud)
这导致:
$ git push origin
Password for 'xxxx':
error: cannot spawn git: No such file or directory
Run Code Online (Sandbox Code Playgroud)
或者我试试:
$ git remote rm origin
Note: Some branches outside the refs/remotes/ hierarchy were not removed;
to delete them, use:
...a whole lot of branches...
user@SOMEMACHINE /some/path/myrepo.git (BARE:master)
$ ls
HEAD config description hooks info objects packed-refs refs
user@SOMEMACHINE /some/path/myrepo.git (BARE:master) …Run Code Online (Sandbox Code Playgroud) 我在一个办公室工作,其中多人同时处理同一个项目,因此我们使用版本控制(git)。目前,我们push/pull所有的内容都提交到了 github.com,但我想对其进行设置,以便我们将push/pull它们发送到特定的共享文件夹。
我尝试过使用 cygwin 的 sshd 但git daemon没有成功。
本质上我想将 github 完全从图片中删除,这样我就可以这样说命令:
git push S:/repo master
git pull S:/repo master
Run Code Online (Sandbox Code Playgroud)
S:/repo共享文件夹在哪里
有任何想法吗?