From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Abrahamsen Subject: Re: [OT] Git plus Syncthing: breaking hard links Date: Thu, 07 Apr 2016 08:48:24 +0800 Message-ID: <87fuuymeg7.fsf@ericabrahamsen.net> References: <87h9fgbm2j.fsf@ericabrahamsen.net> <87pou38cjd.fsf@ericabrahamsen.net> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:56699) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1any86-0001wZ-KC for emacs-orgmode@gnu.org; Wed, 06 Apr 2016 20:49:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1any81-0001pG-IG for emacs-orgmode@gnu.org; Wed, 06 Apr 2016 20:49:02 -0400 Received: from plane.gmane.org ([80.91.229.3]:40480) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1any81-0001p8-CP for emacs-orgmode@gnu.org; Wed, 06 Apr 2016 20:48:57 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1any7z-0005HY-HX for emacs-orgmode@gnu.org; Thu, 07 Apr 2016 02:48:56 +0200 Received: from 114.248.29.184 ([114.248.29.184]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 07 Apr 2016 02:48:55 +0200 Received: from eric by 114.248.29.184 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 07 Apr 2016 02:48:55 +0200 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Adam Porter writes: > Hi again Eric, > > On second thought, while symlinks may be worth trying, they might not work. > I've noticed similar issues using Dropbox. > > If you put the file in your git repo and the symlink in Syncthing's repo, > I'm guessing Syncthing will not follow the symlink, in which case it > wouldn't sync the contents of the file. (I don't use Syncthing, so I could > be wrong. If I am wrong, then this would probably solve the problem for you.) > > If you put the file in Syncthing and the symlink in the git repo, git will > definitely not follow the symlink, so it will only store the symlink itself, > meaning the file contents would no longer be stored in git. (This could > work, but I doubt it's what you want.) Yeah, I did think about symlinks, but think you're right -- they probably won't function correctly no matter which "end" you put them in. > It sounds like your workaround will solve the problem for you, so that's > great. One suggestion though: I recommend excluding the .git directory from > Syncthing. If anything happened on the other end and the git repo were > accidentally corrupted, or if it was committed to on both ends before the > changes were synced, your git repo could end up corrupted, and fixing it > could be a lot of trouble. > > I've had a few problems like this before, so I no longer store VCS repos in > Dropbox. I keep all my Org files in git repos, and I sync the Org files > themselves, but the git repos are local to each system. That's good advice, I think I'll follow it! Thanks for sharing your experience. Eric