开发者

How do i sync/update files using git master stored in dropbox among different computers?

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 dr开发者_运维问答opbox 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?


Although pull is convenient, it hides what's actually going on and can make tracking down issues a bit difficult. So, rather than using pull, use fetch and then merge:

git fetch dropbox
(if you are not already on master) git checkout master
git merge dropbox/master

The advantage of this is that in between the fetch and the merge you can log to see what you've pulled:

git log dropbox/master

As for your 'entry notuptodate', try Git pull: error: Entry foo not uptodate. Cannot merge.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜