3

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?

adjfac
  • 635
  • 1
  • 7
  • 18
  • You are on the `master` branch in both working repositories? – KingCrunch May 21 '11 at 21:03
  • yes, I just want to keep both computers synced to the same repository. – adjfac May 22 '11 at 15:51
  • @adjfac: are you sure you aren't in a detached head mode on computer A repo? (See http://stackoverflow.com/questions/999907/git-push-says-everything-up-to-date-even-though-i-have-local-changes/1000009#1000009 or http://stackoverflow.com/questions/5772192/git-how-can-i-reconcile-detached-head-with-master-origin/5772882#5772882 for more) – VonC May 22 '11 at 16:17
  • @VonC I don't think I am in a detached head mode after reading the two you suggested. When i do git pull dropbox master I now get the error: Entry not uptodate. Cannot merge. and just quits. Thoughts? – adjfac Jun 09 '11 at 04:43
  • 1
    @adjfac: you need first to make sure you aren't in a detached HEAD mode anymore, ie. `git branch` should display a branch with a '*' in front of it. – VonC Jun 09 '11 at 08:04
  • Thanks for all the suggestions. I finally just deleted the copy from computer A and did a clone from the dropbox master. That seems to have fixed everything – adjfac Jun 19 '11 at 21:20

1 Answers1

0

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.

Community
  • 1
  • 1
damian
  • 3,604
  • 1
  • 27
  • 46