您的位置:首页 > 编程语言

git管理代码报错(使用Sourcetree工具) 有子模块Submodule(未解决)

2017-05-09 09:43 671 查看
git报错(使用Sourcetree工具)

//1克隆master(有子模块Submodule)
Submodule 'ReactiveCocoa' (https://github.com/ReactiveCocoa/ReactiveCocoa.git)
registered for path 'ReactiveCocoa'

git -c diff.mnemonicprefix=false -c core.quotepath=false -c credential.helper=sourcetree clone --branch masterhttp://x.x.x.x/project/project-iOS.git
/Users/zhanglizhi/Desktop/17_5_9校优_T
Cloning into '/Users/zhanglizhi/Desktop/17_5_9校优_T'...

warning: templates not found /usr/local/git/share/git-core/templates

git -c diff.mnemonicprefix=false -c core.quotepath=false -c credential.helper=sourcetree submodule update --init --recursive
No submodule mapping found in .gitmodules for path 'Pods'
Completed with errors, see above

//2合并分支(有子模块Submodule)
git -c diff.mnemonicprefix=false -c core.quotepath=false -c credential.helper=sourcetree submodule update --init --recursive
Cloning into 'ReactiveCocoa'...

warning: templates not found /usr/local/git/share/git-core/templates

fatal: reference is not a tree: 89ebed97bffb4116dba39b665d1f1ecb27004d92

Unable to checkout '89ebed97bffb4116dba39b665d1f1ecb27004d92' in submodule path 'ReactiveCocoa'
Submodule 'ReactiveCocoa' (https://github.com/ReactiveCocoa/ReactiveCocoa.git) registered
for path 'ReactiveCocoa'
Completed with errors, see above

使用命令:

1.去到相应的子模块ReactiveCocoa (Submodule)

cd /Users/zhanglizhi/Desktop/项目_hh/ReactiveCocoa

2.查看状态

git status

3.返回主分支

git checkout master

4.可以更新

git submodule update --remote
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: