Using Git and Dropbox on different machines withou

2019-06-05 20:41发布

问题:

I already found some similar topics to this, but it wasn't exactly the same.

I am working on webdesign projects on three different machines

  1. Office Windows PC
  2. Home Windows PC
  3. MacBook

I keep my whole Project-Folder synchronized trough DropBox. This works very well and I'll keep that for sure. I don't share any projects with other persons with DropBox.

Now I'd like to use Git for version controlling and to collaborate on code projects with other persons. I still work on all three machines, but actually this three machines still count as "one person" and only one contributor to a git repository, because it's just me.

I have a BitBucket Account and created a new repo for testing proposes:

  1. I cloned the repo to one of the machines
  2. DropBox automatically synched the folder to the next machine
  3. I tried to clone the repo from BitBucket on the second machine, but wasn't able to do that, because the folder already existed and wasn't empty.

As the project-folder is in a different location on every machine, I somehow doubt this to work. Is there any path-related informations stored inside the .git files?

I think technically, it "should" work if my three local git repos are perfectly synched by DropBox. And then I sometimes push to the master repo on BitBucket. Or is it impossible for me to use Git?

I do not want to have a git master repo inside my dropbox or anything like that. I just want all my local projects synchronized between different machines and still push changes to a bitbucket repo. There would never push two person at the same time, because its just me.

Thanks in advance,

Robert

回答1:

I would advice you to just use BitBucket. You could simply have your master repo there, and push and pull from BitBucket to your three machines.

It seems to me that adding DropBox to the mix gives almost no advantage, but adds a lot of complexity. Whenever DropBox can synchronize, you could just as well reach BitBucket.