简体   繁体   English

如何从本地git服务器克隆特定的Git分支

[英]How to clone a specific Git branch from local git server

I have a shared network directory that contains git repositoiry objects 我有一个包含git repositoiry对象的共享网络目录

\\@ip\git\test-app

In the refs/heads i can see my branche called branche-test refs/heads我可以看到我的分支叫做branche-test

so I want to clone this branche using git 所以我想用git克隆这个分支

so I use this commande 所以我用这个命令

git clone --progress --branch branche-test -v "\\@ip\git\test-app"

This command still blocked not work and there's no error message I ask if this error could be a right access problem ? 此命令仍然阻止不起作用,并且没有错误消息我问这个错误是否是正确的访问问题?

Your command should work from git bash console. 您的命令应该从git bash控制台工作。 Try to test if file path is ok? 尝试测试文件路径是否正常? git clone --progress --branch branche-test -v "//@ip/git/test-app"

If it's on Windows, the shared repository should have been assigned a drive letter, M for example. 如果它在Windows上,则应为共享存储库分配一个驱动器号,例如M In git-bash, you can access the remote repository by /m/git/test-app . 在git-bash中,您可以通过/m/git/test-app访问远程存储库。

git clone --progress --branch branche-test -v /m/git/test-app

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM