Dropbox and git, could it cause conflicts?

What if one hosts a code repo in the Dropbox folder and shares it with others who collaborate. What happens if two people push to the Dropbox repo at the same time? Could this cause conflicts that mess up git?

  • Git with Dropbox Issues
  • Mercurial (and, I guess Git) with Dropbox: any drawbacks?
  • Git, Dropbox and Rstudio
  • Is it possible to host a bare Git repository using Dropbox, to share code?
  • Dropbox and Git working together
  • How to add and pull remote git repo to the project which has lots of untracked files
  • Git commit a commit message and nothing else?
  • git submodule add only pick latest Commit
  • git error - can't push to github - pack-objects died of signal 9
  • Why can't I push my new branch?
  • How do I run git log to see changes only for a specific branch?
  • Can I make a “deep copy” of a git repository with submodules?
  • 3 Solutions collect form web for “Dropbox and git, could it cause conflicts?”

    Dropbox is not the right kind of hosting service to share Git repositories. You can get all kinds of trouble in the moment when a conflict inside .git/ occurs (and such conflicts can even occur in a unchanged repo, for example when one runs git gc), since the content of the .git directory is not designed to be easily merged.

    You can use https://bitbucket.org as an provider when you don’t want public accessible repos.

    I tested this here: http://edinburghhacklab.com/2012/11/when-git-on-dropbox-conflicts-no-problem/

    Conflicts are minor issues. When a corruption occurs no-one can push, so its not a fail silently situation. The fix is to remove all files in dropbox with the (XXX’s conflicted copy) suffix.

    After that is done someone’s commit will not have gone through, so they should just git push again and it will all be fixed!

    I have been using this setup for some time very successfully.

    First, they will never push to the repo at ‘the same time’. One will always be first and the other will be second.

    Next, that is exactly the type of problem git (and other VCS’s) are specialized for. Their algorithms determine if the changes conflict, and if so by how much.

    So, ideally, there may be issues, but the second pusher will be notified of these conflicts and asked to resolve them before they are able to successfully push/merge to the repo.

    Git Baby is a git and github fan, let's start git clone.