【发布时间】:2012-03-26 16:42:08
【问题描述】:
作为一个相对子模块的菜鸟,我想从它的起源更新我的子模块,并且做到了:
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]
现在看来我确实得到了更新的代码,但是我目前没有在任何分支上工作。
我应该怎么做才能正确更新我的子模块,我应该怎么做才能修复这个当前状态?
【问题讨论】:
标签: git git-submodules git-pull