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

来源:互联网 发布:js 全国城市字母排序 编辑:程序博客网 时间:2024/05/22 12:57


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



0 0
原创粉丝点击