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'
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'
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