开发者

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

开发者 https://www.devze.com 2023-03-07 06:51 出处:网络
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

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

精彩评论

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