Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free.

This question already has an answer here:

I'm a hobbyist programmer working on my own projects. I work on a number of different computers.

Currently what I have to do is mail myself the project and import it into the IDE every time I move to a different computer. This is annoying.

I thought maybe putting all my projects in my Dropbox folder and setting it as the workspace for my IDE in each of my computers can be a decent solution.

Considering I don't want to try source control and different tools right now - would you say Dropbox is a valid solution? Or can it cause problems?

share|improve this question

marked as duplicate by GlenH7, MainMa, gbjbaanb, Robert Harvey, MichaelT May 10 '14 at 1:15

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

Take the time to set up source control. Not what you want to hear, but it's worth it. I set up my projects on BitBucket. Now I just need to work on them. :D –  MetalMikester May 9 '14 at 19:11
I'd recommend reading HgInit and putting your code in a free version control repository such as at Bitbucket. –  Mike Partridge May 9 '14 at 19:12
I actually use a comparable setup. All of my personal git repos are inside a Dropbox folder, which allows me to access the files from any browser (and also makes migrations to a new computer much easier). This works fairly well, although downloading all files to a new computer takes some time. Using Dropbox also raises some privacy concerns. Sometimes, conflicts can arise if a project is worked on from multiple computers (e.g. left over temp files). Anyway, do try out git. It's so easy and lightweight that it really isn't any burden to use. Dropbox cannot stand in for proper version control. –  amon May 9 '14 at 19:18
What's wrong with version-control tools? You should try Heroku, it will give you a free git repository (well.. free until your app gooes beyond a certain performance threshold): heroku.com –  theMarceloR May 9 '14 at 19:26
Why not use GitHub? –  Jonathan Landrum May 9 '14 at 19:30

6 Answers 6

Even though I know you're not really interested in trying version control right now, I would recommend against using Dropbox for such a scenario. What you really need as a programmer is a version control system such as Mercurial or Git coupled with a repository hosting solution such as GitHub or BitBucket. You'll be greatly benefited by learning version control. Since it sounds like you've never used version control, I think learning Mercurial and BitBucket may be the easiest to start with.

Here's my recommended workflow for you:

  • Make changes on one computer. Commit them to your local Mercurial repository, then push them up to your remote repository on BitBucket. Make this a regular practice when you do development
  • When you get to your other computer, pull down the most recent changes from BitBucket. Follow the same pattern as before: When you make changes, commit them to your version control system and push them back up to your remote repository.

Once you're familiar with them, you'll find version control systems like Git and Mercurial a far superior alternative to Dropbox.

share|improve this answer
I don't see why using Dropbox and a DVCS have to be mutually exclusive. I mean, Dropbox isn't a standard way t osynchronize repositories, but in this scenario, I think it would work. If it's just one person looking for file sync, then there's no real need for the sync server to even know what a repository is. So why not use Dropbox for sync and drop in Git or Mercurial for code history (and all the other goodness)? –  Carsten May 10 '14 at 1:04
Because hg / git repos do things file synch tools like dropbox don't like. There is no guarantee of atomic commits so even if you commit successfully dropox could screw up and corrupt your .hg folder which it would merrily synch over your other copy on your other PC and then you are really hosed. Clicking a push button adds nearly zero overhead once you are committing files. –  Wyatt Barnett May 10 '14 at 13:34

Technically dropbox will work in general -- largely because the amazing job they have done with their synch tool. One big downside risk is the amount of local trash IDEs tend to create that probably aren't meant to be transitioned across machines. Another issue is dropbox isn't wholly atomic so you could get half a project updated which gets entertaining.

There are, however, atomic cloud-based options that are designed for this sort of thing -- our public cloud based SCM providers. Bitbucket.org is a great option as they give you unlimited free private repositories and HG is much more approachable than git. Moreover it will let you properly store things with a real version history and it becomes a skill that you can put on your resume. Outside of the whole "designed for this sort of thing and generally just works" thing.

share|improve this answer
Thanks for answering, a question for if I do use Dropbox: when I change a source file in the Dropbox folder, does the file automatically update in all my other computers? –  Aviv Cohn May 10 '14 at 0:32
Yes. How you get back the previous version is an interesting question as well. –  Wyatt Barnett May 10 '14 at 0:57
So basically Dropbox isn't recommended for managing programming projects because it can't revert to previous versions easily. But for keeping a project in sync on different computers - it's fine. Right? –  Aviv Cohn May 10 '14 at 0:59
No, it isn't fine. It is probably OK for keeping files in synch between computers outside of the fact there is no SLA, the synch tool has no concept of an atomic commit and there is no recourse when it blows up. I would not do it. –  Wyatt Barnett May 10 '14 at 13:34

Dropbox works pretty well for this. I did this with a small team for about a year and it worked effectively. You can use Dropbox in conjunction w/ source control. The two aren't mutually exclusive.

Another option is to set up a remote desktop server on a development machine. Then you don't have to worry about making sure the proper tools are installed everywhere or work as needed on every machine. How well this works will depend on the connection you have and the nature of your programming (it may not be appropriate for 3d game dev). If you are on Windows, I've found the native RDP connections work very well over a standard broadband connection. On Linux, NX/FreeNX gives very good results (better than VNC).

share|improve this answer
+1 for the remote desktop solution. That's the route I've taken and it's working out great. I have a VM in the cloud with all my stuff on it and I just connect to it from wherever I happen to be and whatever device happens to be available. As long as I've got 1 Mib/s of bandwidth available the experience is fine. –  Brian Knoblauch May 9 '14 at 20:09

This depends on your needs. You can get away with Dropbox alone if:

  • The project is not collaborative. Although Dropbox supports shared folders and collaboration, the issues that arise with file conflicts and Dropbox's inability to merge source code will severely get in the way. I've done it before, a few years ago before I became familiar with git. It's awful and risky.
  • You are not concerned with robust versioning. Dropbox will keep every copy of every file synced to their servers for 30 days, but trying to hunt down an old version can be very tedious, especially with files like source code that are constantly being changed, since you cannot make explicit snapshots of your entire project on command.

If you are working with others, and you don't have a need for hyper-organized code history, Dropbox should actually be a great solution for you, especially if you use multiple computers.

However, I recently converted to using git and Dropbox in conjunction with each other, and it works beautifully. Dropbox syncs hidden folders, which includes the ".git" directory at the root of any git-controlled project. My day job is iOS development, but occasionally I have to work from home, so I can leave my work computer at the end of the day, and all of my files—source code (including uncommitted changes), local branches, git stashes, even my installed Cocoapods—will synchronize with zero effort on my part. I get all of the benefits of using source control, but I never have to worry about pushing and pulling my own code to myself. If you are comfortable with git but are concerned abou working from multiple machines, I seriously recommend trying out this solution. Just make sure Dropbox finishes syncing before putting your computer to sleep =P

share|improve this answer

I have used it and it worked for me. Just be aware of the caveats in your situation.:

  • no built in branches, so you can't work on, say an upgrade, in an isolated area without making manual copies.

  • Any copy you make that doesn't get synched can't then be easiy 'merged' back in to a newer version with different changes.

  • No built in way to share files in the future with others the way dropbox does.

  • no way to step back in time and rollback changes

  • missed opportunity to use git or some other source control system which is becoming almost standard for working as a programmer in many companies.

share|improve this answer

I wouldn't use Dropbox because of the missing versioning, so you can't for example roll back to a state before you introduced a bug n feature Xy.

Also the previous versions you can access in Dropbox are not commented, so you can't tell what has been changed when. In a version control you can just look through the log of commit messages and if you take the time to write a meaningful commit messages you will find "modified feature Xy for performance".

And since nobody mentioned Subversion (SVN) so far, I'm throwing that in the ring too. The mental model of one real repository is easier to grasp than collaborative ones like git, where you have local commits and public commits and can merge them or not and so on.

When you understand it in the linear way svn does it, you can still switch to git or mercurial if you need it. Local commits can get handy when you work in a team.

You are mentioning which IDE you use, but almost all of them have support or plugins for the common version controls.

share|improve this answer

protected by Community May 10 '14 at 0:12

Thank you for your interest in this question. Because it has attracted low-quality answers, posting an answer now requires 10 reputation on this site.

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.