cweagans / docker-bg-sync

A container that syncs files between two configurable directories.
223 stars 39 forks source link

Ignoring .git folder is wrong #22

Open much-rebel opened 6 years ago

much-rebel commented 6 years ago

Problem

Ignoring git folder from syncing is wrong as many application may rely on git info like commit hash for versioning and stuff.

Solution

Remove line: https://github.com/cweagans/docker-bg-sync/blob/master/sync.sh#L159

Extra solution

To make ignore patterns configurable

cweagans commented 6 years ago

The whole point of this is to sync files into a container so that DfM's filesystem performance isn't garbage. Syncing .git into the container as well will take a lot of time for nontrivial repositories.

That said, if you need this, you can mount your own profile in the container in /home/[unison user]/.unison/default.prf that doesn't ignore .git.