如何使用存储在保管箱中的 git master 在不同计算机之间同步/更新文件?
我按照找到的说明设置了我的主 Dropbox 存储库:http://tumblr。 intranation.com/post/766290743/using-dropbox-git-repository。我能够创建远程并将存储库克隆到另一台计算机,没有任何问题。
现在我在计算机B中提交更改并将其推送到dropbox master,然后
git commit -m "test to see dropbox repo works" % commit changes to local repo
git push dropbox master % push to remote master located in the dropbox folder
在计算机AI中
git pull dropbox master
显示它已更新,但我没有看到我修改的文件中的更改?我在这里做错了什么?
I setup my master dropbox repo following the instruction found: http://tumblr.intranation.com/post/766290743/using-dropbox-git-repository. I was able to create the remote and clone the repo to another computer without any problems.
Now I commit a change in computer B and push it to the dropbox master by
git commit -m "test to see dropbox repo works" % commit changes to local repo
git push dropbox master % push to remote master located in the dropbox folder
then in computer A I do
git pull dropbox master
It shows that it's updated, but I didn't see the changes in the files that i modified? What am i doing wrong here?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
尽管
pull
很方便,但它隐藏了实际发生的情况,并且可能使跟踪问题变得有点困难。因此,不要使用pull
,而是使用fetch
,然后使用merge
:这样做的优点是在
fetch
之间> 和merge
您可以log
查看您提取的内容:至于您的“entry notuptodate”,请尝试 Git pull:错误:条目 foo 未更新。无法合并。
Although
pull
is convenient, it hides what's actually going on and can make tracking down issues a bit difficult. So, rather than usingpull
, usefetch
and thenmerge
:The advantage of this is that in between the
fetch
and themerge
you canlog
to see what you've pulled:As for your 'entry notuptodate', try Git pull: error: Entry foo not uptodate. Cannot merge.