eoi*_*noc 10 git git-pull git-submodules
作为一个相对子模块菜鸟,我想从它的原点更新我的子模块,并做了:
git pull
这导致:
remote: Counting objects: 111, done.
remote: Compressing objects: 100% (3/3), done.
remote: Total 57 (delta 54), reused 57 (delta 54)
Unpacking objects: 100% (57/57), done.
From github.com:eteanga/smarty
   8e9a011..818ab3e  master     -> origin/master
You are not currently on a branch, so I cannot use any
'branch.<branchname>.merge' in your configuration file.
Please specify which remote branch you want to use on the command
line and try again (e.g. 'git pull <repository> <refspec>').
See git-pull(1) for details.
试图解决:
git pull origin master
输出:
From github.com:eteanga/smarty
 * branch            master     -> FETCH_HEAD
Updating 8e9a011..818ab3e
Fast-forward
[snip]
现在看来我确实得到了更新的代码,但我目前没有在任何分支上工作.
我应该怎么做才能正确更新我的子模块,我该怎么做才能修复这个当前状态?
oua*_*uah 19
在a之后git submodule update,将HEAD子模块中的子模块设置为保存在超级项目中的子模块.如果要重置HEAD子模块以跟踪新提交,origin/master首先必须签出master然后拉出更改:
在子模块目录中:
git checkout master
git pull origin master
| 归档时间: | 
 | 
| 查看次数: | 4845 次 | 
| 最近记录: |