3

EDIT

Sorry I forgot about this question. It turns out, he had added the repository incorrectly. We have everything working now and are finding this to be a FANTASTIC way to use Git for free.

END EDIT

Using this link I have been setting up Dropbox with Git repos for a bit just for fun, but have never had to share them with anyone else. Now I am sharing one and I can't quite figure out how to get it working as a full git repository for us.
I have shared the Dropbox .git folder with him and he has access to it, and using git checkout /path/to/dropbox/folder he can get the full directory....but any changes he makes are not coming across.
We added a single file to the folder and did git add test.txt and git commit -m 'Test Commit' and git push origin master and it said it pushed the changes. However, on my machine when I do git pull origin master it tells me there are no changes.

If I do git branch -a on my directory I see:

* master
remotes/origin/master

but on his directory we see:

*master
remotes/origin/HEAD -> origin/master
remotes/origin/master

Where did I screw up on this?

Community
  • 1
  • 1
James P. Wright
  • 8,991
  • 23
  • 79
  • 142
  • 2
    Do your changes propagate to him? Look at the dropbox activity to see if the dropbox repo is actually getting the changes pushed onto it. – Andy Jul 13 '11 at 18:17
  • I think it may have something to do with folder organization. For example my .git folder is under `/Dropbox/Projects/Sites/myrepo.git` and when it is shared with him it is under `/Dropbox/myrepo.git` I have been able to create 2 folders on my machine using the .git folder as the "server" and both can checkout, edit and push and pull files so it's possible you have to enforce the directory structure within Dropbox. – James P. Wright Jul 13 '11 at 23:25
  • Shouldn't matter where the repo is located in your local file structure. Can you answer the questions from the first comment? – Andy Jul 14 '11 at 02:16
  • No my changes don't propagate to him, that was the point of my question. Dropbox is getting and pushing the changes just fine. – James P. Wright Jul 14 '11 at 02:25
  • I must be misreading your question. I read it that his changes weren't propagating to you. – Andy Jul 14 '11 at 02:57
  • Sorry if it is confusing, the changes are not going in either direction but the Dropbox folder is updating. – James P. Wright Jul 14 '11 at 04:35

2 Answers2

1

Are there any Dropbox conflicted files in your .git folder under Dropbox? I've tried to share git repositories this way and inevitably one or more of the git blobs inside the repository get into a conflicted state with Dropbox. What can be confusing about this is Dropbox will then choose one of the files to use and create a copy of the other that is named differently. This will then cause any changes to the conflicted version to seemingly disappear from the repository.

asm
  • 8,758
  • 3
  • 27
  • 48
0

Answer posted as Edit on question:

Sorry I forgot about this question. It turns out, he had added the repository incorrectly. We have everything working now and are finding this to be a FANTASTIC way to use Git for free.

James P. Wright
  • 8,991
  • 23
  • 79
  • 142