From: Joey Hess Date: Tue, 13 Sep 2022 18:58:45 +0000 (-0400) Subject: comment X-Git-Tag: archive/raspbian/10.20250416-2+rpi1~1^2~69^2~126 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=939276b4dfa64f1d8d48212a11a39acca99d922b;p=git-annex.git comment --- diff --git a/doc/forum/Ensure_all_versions_are_on_remotes/comment_2_ad5f1f0b98032361e64bb7275d23e97c._comment b/doc/forum/Ensure_all_versions_are_on_remotes/comment_2_ad5f1f0b98032361e64bb7275d23e97c._comment new file mode 100644 index 0000000000..ccf430fe27 --- /dev/null +++ b/doc/forum/Ensure_all_versions_are_on_remotes/comment_2_ad5f1f0b98032361e64bb7275d23e97c._comment @@ -0,0 +1,20 @@ +[[!comment format=mdwn + username="joey" + subject="""comment 2""" + date="2022-09-13T18:40:02Z" + content=""" +`sync --content` will certianly remove files from a repository when +the preferred content settings for that repository indicate it should +not contain that content. + +When you use `sync --all`, a preferred content setting like +`"include=*"` or `"exclude=*"` will only ever match files in the current +working tree, not past versions of files. + +So, if the remote has such a preferred content expression, `sync --all +--content` will remove the past versions of files from it. + +The way to avoid this behavior is to use a preferred content expression +that does not match on the filename. Eg, `"anything"`. Or don't set a +preferred content expression in the first place. +"""]]