Hacker News new | ask | show | jobs
by omarrr 4729 days ago
> I use it to store my code repository [...] Not using Dropbox is not an option for me as I switch machines several times during the day.

I'd suggest you invest in a hosted git repo.

5 comments

No need really. Bitbucket offers an unlimited number of private repos, it's ideal for this stuff.
i actually do the same as the op and i really like to have a seperate backend up copy of the code in dropbox BEFORE i commit to git. Furthermore i dont really want to commit only because i am changing machines, but if i have something significant and non breaking to commit. This is less of a problem with git as you can just work in your own branches very easily, but still, working on code on multiple machines is just seamless with dropbox.
I store a lot more than just a git repo in Dropbox. I also use it to share files, etc. But yes, I'm starting to look at alternatives. Maybe I'll develop a small utility to push/pull/share files from my home NAS upon request rather than having a continuous process running in the background.
You can also, what I did, switch dropbox off and switch it on only when you are connected to power for a sync. It's not ideal, but it works. I don't see how dropbox could do better though. If you do it manually to your NAS, you basically do the same as switching dropbox on/off or dropbox in a cronjob. Anything monitoring your file system and synching up with many small files will incur load like this.
I use ControlPlane - http://www.controlplaneapp.com/ - which monitors your "context" (like location etc.) and lets you trigger events on context change.

Just added some rules so that Dropbox quits when I'm in my "mobile" context, but reopens when I am in my "home" or "office" contexts. Will see whether it works on my commute later.

Nice! Thanks for that tip.
And I'll note that after my commute home, I do seem to have a bit more battery life than usual. So that's a win.
It already exists, it's called git annex. It uses git to keep track of where files are (but doesn't check them in), so you can just do:

  $ git annex add myfile
  $ git annex copy --to=NAS myfile
  $ git annex get myotherfile
  $ git annex drop --from=NAS myotherfile
If the NAS has rsync support, you can add it with a single command:

  $ git annex initremote NAS type=rsync \
    rsyncurl=rsync://example.com/myrsync encryption=<gpg-email>
http://git-annex.branchable.com/
Thanks! I'm taking a look at this now.
git repo outside of dropbox to store code and changes, but use dropbox to share project files like docs etc. Works well.
Or put gitlab on some VPS you own.
usb stick + truecrypt volume for me.Fast and secure. Also my private code is not on somebody else server.