Let’s imagine this scenario
Running Dropbox in my Windows Work PC, my Windows Home PC and my Mac laptop, and all have different local folders and Git 1.7.4 is installed in all
enumerating them:
- Machine 1: Windows Work PC
- Machine 2: Windows Home PC
- Machine 3: Mac Laptop
I create a new folder in Dropbox and let’s assume I took Machine 1 and the ending path is
D:\DropBox\Projects\My AspNet Mvc WebApp\
so I do
git init
git add .
git commit -m "initial commit"
and also run git remote to hook up with the cloud repository and do my git push.
My question is simple
How can I now commit changes made in other machines?
Can I do
git add .
git commit -m "My changes"
git push could master
from other machines?
Note: I’m using AppHarbour as my cloud service
Note 2: Dropbox don’t replicate .git folders 🙁
You said:
You’ll need a commit in between those (and I’m assuming your remote is named “could”), but yeah, in principle, what you’ve got there is a git repository that’s kept in sync via dropbox on all the machines that share that dropbox directory. In principle you could go from one machine to the other and have the “same” repository on both of them.
Now, I’ve heard a few things about dropbox hosing .git directories–something about permissions, I think. Also if you’re making and committing different changes at the same time from different machines, obviously dropbox is going to end up with conflicting versions that it may or may not resolve nicely. But those caviats aside, yes this should work, and from what I’m reading people are having some success sharing git repos with working directories inside shared dropboxes.