我可以通过以下命令克隆存储库:
exec("git clone pull https://user:password@bitbucket.org/user/repo.git");
但是,不能通过以下命令从任何分支中提取:
exec("git pull https://user:password@bitbucket.org/user/repo.git mybranch");
有什么想法吗?
UPDATE:我在调试了很多之后找到了解决方案:)首先,我通过以下命令克隆了我想要的分支:
exec("git clone pull https://user:password@bitbucket.org/user/repo.git --branch branch_name path_to_clone");
然后在存储库中创建一个新文件('path_to_clone')。在里面,添加了拉命令:
exec("git pull https://user:password@bitbucket.org/user/repo.git branch_name");
很好!!
发布于 2018-01-23 20:26:13
根据男人,您应该指定遥控器的名称。
git pull origin develophttps://stackoverflow.com/questions/48410112
复制相似问题