我是 git 的新手。我一直主要将内容 checkin 存储库,但现在我想从其他开发人员那里获取最新更改。
我试着简单地执行一个命令,比如 git pull
something run,但它返回了这样的消息:
There is no tracking information for the current branch.
Please specify which branch you want to merge with.
See git-pull(1) for details
git pull <remote> <branch>
If you wish to set tracking information for this branch you can do so with:
git branch --set-upstream develop origin/<branch>
然后我做了 git pull my_branch_name
返回结果是这样的:
fatal: 'develop' does not appear to be a git repository
fatal: The remote end hung up unexpectedly
但在那之前我已经完成了 git checkout my_branch
。
有人可以告诉我我做错了什么以及我如何才能简单地获取已 checkin 的最新文件吗?
谢谢!
最佳答案
我认为您在 pull 时错过了 Remote 的名称:
git pull <remote> my_branch_name
运行这个命令:
git remote -v
然后检查您要从中提取的 Remote 的名称是什么
编辑:
如果你是 Git 新手,我会推荐你 this book .它涵盖了从基础到高级的主题,易于理解和阅读
关于git - 新用户尝试 pull 并收到一些令人困惑的消息,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12054223/