Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I put my git working directory inside dropbox so I can seamlessly work from any dropbox-enabled computer without committing?

Tags:

git

svn

dropbox

When I'm at work I use my macbook, but at home I prefer to use my imac. When we were using subversion, all I had to do was put my working directory inside my dropbox folder, and it would sync up my two computers without a problem. I could stop working on my macbook at work (without committing or pushing), then pick up where I left off on my imac at home, finish what I was working on, and commit my changes from home. From either computer, it's treated like I'm doing all my work on that same computer.

So I want dropbox to house my local working directory and to be synced across my computers. I do NOT want to use my dropbox folder as my origin master (which is mostly what I found when I googled for this). I'm happy using github for that. I just want to be able to switch from computer to computer without a hiccup.

We switched to git and it doesn't work this same way for some reason. I get crazy errors with conflicts all over the place. It's like the git information isn't actually housed inside the dropbox folder... or maybe dropbox isn't seeing and syncing changes because of how git manipulates timestamps on files (guessing here).

Anybody have any idea why this works differently with git and what I could do to get the same behavior again?

like image 593
Bob Ralian Avatar asked Dec 22 '10 16:12

Bob Ralian


1 Answers

If you're using github (or any other git hosting service, as long as you can access it from both places), then just clone the central repository from github on your work computer, and clone it again from your home computer. When you're done making changes, push them to the central repo, and then pull then when you get to your other computer. True, this requires you to commit first, and if you're working on a team then you don't want to publish "work in progress" commits. Maybe make a branch in the central repo that only you use, and keep your WIP commits there.

Using dropbox seems weird to me. There should definitely be a way to do what you want to do using only git.

like image 60
Tyler Avatar answered Oct 23 '22 11:10

Tyler