Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/git/20.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
git分支交换和子模块_Git - Fatal编程技术网

git分支交换和子模块

git分支交换和子模块,git,Git,我有两个分支,master和secondary,它们通过合并master=>secondary定期保持同步。 有一次,master有几个子模块被删除,相同的子模块被重新添加 我现在正试图将主合并到辅助中,但每当我尝试从主切换到辅助,我都会在被覆盖的子模块上收到以下错误消息: warning: unable to rmdir libs/AFNetworking: Directory not empty warning: unable to rmdir libs/MBProgressHUD: Dir

我有两个分支,
master
secondary
,它们通过合并
master=>secondary定期保持同步。

有一次,
master
有几个子模块被删除,相同的子模块被重新添加

我现在正试图将
合并到
辅助
中,但每当我尝试从
切换到
辅助
,我都会在被覆盖的子模块上收到以下错误消息:

warning: unable to rmdir libs/AFNetworking: Directory not empty
warning: unable to rmdir libs/MBProgressHUD: Directory not empty
Branch secondary set up to track remote branch secondary from origin.
Switched to a new branch 'secondary'
“主”分支开始时如下所示:

git clone repourl:master.git
cd project_directory
git submodule update --init <= in master at the moment
git checkout secondary
git克隆repourl:master.git
cd项目目录

git子模块更新--init我不确定,但听起来像是那些目录,其中一个分支中没有git,但另一个分支中没有。我怎么知道它们不是哪个分支的一部分?