News for hackers. Stuff that matters.
Re:Dropbox will kill your insane MacBook Air 2013 battery by bherms on Wednesday July 03, 2013 @04:49AM (#5983236)
I had this happen in the past too and found it to be the result of two issues:

1) Using dropbox to house a very large git repo with massive changes and tons of branches... Every time I switched branches, the hundreds of files would change and obviously kick off a major sync job.

2) There were a few files in a folder than had the owner set to the wrong owner and Dropbox couldn't get permission to access them. This caused it to get stuck in a loop trying to sync those files and Dropbox ended up running my CPU up to over 100% load.

Fix those issues and you shouldn't see it causing any more problems with your battery life.

Re:Dropbox will kill your insane MacBook Air 2013 battery by InclinedPlane on Wednesday July 03, 2013 @04:59AM (#5983270)
Try this: separate out the git directory from the working directory so that the working directory is not in dropbox but the git directory is. That might solve some of your problems.

E.g.: git --git-dir=/home/me/dropbox/git/proj --work-tree=/home/me/proj init

Re:Dropbox will kill your insane MacBook Air 2013 battery by cnvogel on Wednesday July 03, 2013 @08:22AM (#5984019)
(1) you can also use the GIT_DIR environment variable, which might save some typing during development

(2) another solution is to just clone the bare repository in Dropbox to a temp-directory, work there, and push the changes back to the Dropbox'ed repo. Saves you the effort to specify GIT_DIR or --git-dir all the time and is the saner approach if you have to switch back and forth between different repos.

    $ GIT_DIR=~/Dropbox/my_repo git init --bare
    Initialized empty Git repository in /home/chris/Dropbox/my_repo/

    $ git clone ~/Dropbox/my_repo
    Initialized empty Git repository in /home/chris/my_repo/.git/
    warning: You appear to have cloned an empty repository.

    $ cd my_repo ; touch README
    $ git add README ; git commit -m "README" ; git push origin master
    [master (root-commit) ada37ca] README
     0 files changed, 0 insertions(+), 0 deletions(-)
     create mode 100644 README
    Counting objects: 3, done.
    Writing objects: 100% (3/3), 213 bytes, done.
    Total 3 (delta 0), reused 0 (delta 0)
    Unpacking objects: 100% (3/3), done.
    To /home/chris/Dropbox/my_repo
     * [new branch]      master -> master
Re:Dropbox will kill your insane MacBook Air 2013 battery by raverbashing on Wednesday July 03, 2013 @05:03AM (#5983288)
Don't use dropbox to solve a solved problem: git backups should go to another git "server" (like bitbucket or github)

But yes, the dropbox client devs should go through these bugs and hopefully fix them

Re:Dropbox will kill your insane MacBook Air 2013 battery by bherms on Wednesday July 03, 2013 @06:09AM (#5983479)
Yeah, was just oversight on my part at the time... Luckily figured out what was wrong and went another route instead of keeping things in dropbox.
Re:Dropbox will kill your insane MacBook Air 2013 battery by easytiger on Wednesday July 03, 2013 @04:59AM (#5983266)
> Using dropbox to house a very large git repo with massive changes and tons of branches... Every time I switched branches, the hundreds of files would change and obviously kick off a major sync job.

I really have to say honestly: no shit. Sorry if i sound crass but really? When you use an arbitrary piece of software to automatically modify 100s of files the piece of software designed to detect that exact event has do do work and you are complaining? The mind boggles

Re:Dropbox will kill your insane MacBook Air 2013 battery by simonh on Wednesday July 03, 2013 @05:19AM (#5983335)
Which part of that comment looked to you like a complaint?
Re:Dropbox will kill your insane MacBook Air 2013 battery by bherms on Wednesday July 03, 2013 @06:07AM (#5983475)
Wasn't complaining at all... Just pointing out the mistake I made.
Re:Dropbox will kill your insane MacBook Air 2013 battery by officialjunk on Wednesday July 03, 2013 @05:21AM (#5983341)
easy tiger
Re:Dropbox will kill your insane MacBook Air 2013 battery by jlgreco on Wednesday July 03, 2013 @05:53AM (#5983435)
If you are going to use git/Dropbox like that (and I can't say I really recommend it in the first place) then you should keep a bare repo in dropbox and use it as a local 'remote' (check out working repos from it on each computer that you are working on, and push/pull to/from the bare repo in Dropbox).