[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] [OT] Git plus Syncthing: breaking hard links
From: |
Eric Abrahamsen |
Subject: |
Re: [O] [OT] Git plus Syncthing: breaking hard links |
Date: |
Thu, 07 Apr 2016 08:48:24 +0800 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) |
Adam Porter <address@hidden> 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