Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Git with Dropbox Issues

Tags:

git

dropbox

Question about Git and Dropbox. I set up Git and Dropbox using the various tutorials online. When I push up my project, I notice that the dropbox folder is very small (1mb vs about 4 on my local machine). I'm pretty sure that the actual files aren't being pushed up to dropbox. Is this normal?

Thanks!

like image 772
Astephen2 Avatar asked Dec 21 '22 02:12

Astephen2


2 Answers

As it was already pointed out, Dropbox isn't the safest solution to share your repo (see "Is this plain stupid: GIT Sharing Via DropBox?".

Greg Bacon remarked that Dropbox already retains old versions of files, which is a bit redundant with what Git already does.

See "this discussion" (which was about a full repo backup, not just a bare repo though):

Well, Dropbox is known for becoming slow when syncing lots of files and Git, by design, creates lots of files on your harddrive. You can encourage packing those many loose objects into few packed objects by running git gc on a regular basis though.

Also Dropbox will start syncing stuff as soon as you do basically anything: checkout, stash, commit, fetch, rebase, reset etc. I'd fear that if I was working too fast, Dropbox would start creating conflicted copies of my files.

Even worse, Git's internal storage is even more fragile (Git is by no means a backup method!) and because Dropbox was designed to handle your average .doc files, it is just too careless when it comes to manipulating files or filenames. If something in there fails, you might see yourself out of luck.

I use dropbox with a git bundle: only one file to synchronize.
Much less issues that way (but that also means that local setups like hooks aren't part of my bundle).

like image 115
VonC Avatar answered Jan 02 '23 23:01

VonC


you might consider telling dropbox to ignore the .git directories in your repo. i use dropbox to keep copies of my files (in case i do something dumb with git and nuke my changes), but i don't need dropbox to keep a copy of the .git directories.

in dropbox prefs, under advanced there's a section called "selective sync" that allows you to disable syncing of specific folders.

like image 42
kolywater Avatar answered Jan 02 '23 22:01

kolywater