Live data from Hacker News

The beauty of Git in Dropbox

news.ycombinator.com

1–10 of 33 posts

The beauty of Git in Dropbox

#1
I have been debating with friends about the power of git merged to the simplicity of Dropbox.

Hear me out. I can see a very cool feature when using git within a dropbox folder.

Imagine you are working on several computers (one at home, one at work, one laptop). With git, you can (obviously) pull to get the latest version of your branch on all your devices. But if you put your git repo on dropbox, you just fire your laptop on and your project will be up to date !

What do you think about this workflow ? Would you do this ? Do you see any problems with this usage ? I would love to hear more.

Re: The beauty of Git in Dropbox

#4
I have for about a year now done all my work out of Dropbox (via a symlink from ~/src) it works great for multiple machines and has added advantages, eg. I never worry about deleting files that aren't staged anymore, as I can undo the delete from Dropbox’s website.

Git is for long-term version control, working out of Dropbox is like having a script running that stashes and unstashes every change you make so that its in the git-reflog.

Re: The beauty of Git in Dropbox

#6
This has been discussed before as a bad idea. Unless Dropbox has improved, you'd likely run into syncing issues like I did 6 months ago.

On the other hand, the top voted answer on this SO question demonstrates how one might use a Dropbox directory as a git remote, so that you can push code there intermittently, preventing the trouble with constant writes to the Dropbox.

http://stackoverflow.com/questions/1960799/using-git-and-dro...

Re: The beauty of Git in Dropbox

#7
When you save to Dropbox, you're just saving to your local machine. Then the Dropbox app pushes the changes to the Dropbox server. When you wake up or turn on another authorized computer, the Dropbox app on that machine polls the Dropbox server, and pulls the changes.

Conceptually, it's the same as using a hosted git remote repo, like Github. The only thing it saves you is having to type the git push and pull commands...not a huge savings IMO.

Besides that, the only advantage I can see is that the Dropbox process is private by default, whereas Github repos are public unless you pay.

Re: The beauty of Git in Dropbox

#9
This is not a good idea. Dropbox has its own notion of how to resolve conflicts, while git spreads its repository over several files; if you commit from two machines at the same time it is entirely plausible it will corrupt your repository. If your only goal is to have your git repository "autopull" it'd be pretty easy, and much safer, to script that
Post reply on HN