我如何执行 git pull 以便它更新工作中的文件
当我执行 git pull origin master 时,它似乎没有更新 git 存储库文件夹中的文件。
When I do git pull origin master, it does not seem to update the files in the folder of the git repository.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
一些建议,
尝试使用 git pull -v origin master 来查看详细版本是否产生任何线索。
如果您可以克隆您的存储库并使其处于任何
git pull
之前的状态:git fetch origin master
,相当于“git fetch origin master:
”,而不是“git fetch origin master:master
”(即:它存储获取的“master' 分支(远程“
origin
”)位于FETCH_HEAD
中,而不是位于“master
”分支或远程跟踪“remotes” /origin/master
' 分支。这意味着您可以尝试检测该提取是否会引入任何更改:
A few suggestions,
Try a
git pull -v origin master
to see if the verbose version produces any clue.If you can clone your repo and get it in a state before any
git pull
:git fetch origin master
, which is equivalent to "git fetch origin master:
", not to "git fetch origin master:master
" (i.e.: it stores fetched value of 'master
' branch (of remote 'origin
') inFETCH_HEAD
, and not in 'master
' branch or remote-tracking 'remotes/origin/master
' branch.That means you can try and detect if any changes are to be introduced by that fetch:
你可以骚扰 gremlinz。
git-pull 应该获取远程更改并将它们合并到当前分支中。
要验证更改是否已合并,请执行 git log 来验证您期望的修订是否位于本地分支中。
来自
git-pull
doco :You can haz gremlinz.
git-pull
is supposed to fetch the remote changes and merge them into the current branch.To verify that the changes have been merged, do
git log
to verify that the revisions that you are expecting are in your local branch.From
git-pull
doco:也许您没有对遥控器进行任何更改(或者维护它的人没有更新它)。
也许您有多个遥控器,并且您对哪一个
pull
应该获取表单感到困惑。Maybe you didn't make any change to the remote (or who ever maintains it didn't update it).
Maybe you have more than one remote and you're confused about which one
pull
is supposed to fetch form.