From: jwiegley Date: Thu, 16 Mar 2023 12:02:10 +0000 (+0000) Subject: (no commit message) X-Git-Tag: archive/raspbian/10.20250416-2+rpi1~1^2~50^2~110^2~2 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=6f3624262dc76e51fa5975893eba4ffebbb7e087;p=git-annex.git --- diff --git a/doc/forum/How_stop_annex_from_annexing_a_file_with___34__git_add__34__.mdwn b/doc/forum/How_stop_annex_from_annexing_a_file_with___34__git_add__34__.mdwn new file mode 100644 index 0000000000..f88f683469 --- /dev/null +++ b/doc/forum/How_stop_annex_from_annexing_a_file_with___34__git_add__34__.mdwn @@ -0,0 +1,14 @@ +At one point, in two repositories, I added the `largefiles` options to my `.gitattributes` file: +``` +* annex.backend=BLAKE2B512E annex.numcopies=2 annex.largefiles=largerthan=32kb +``` + +There were already Org-mode files in those repositories, kept under git. I used `git annex init` on those repositories long after those files had been under version control. + +Since some these files were larger than 32k, it appears that after editing them, git-annex decided to alter the files so that the content in Git HEAD for each file is a pathname into the `objects` directory. That is, when I use `ls -l` the file is never a symlink, and yet if I use `git show HEAD:todo.org`, I see a pathname. Using `git annex unlock` on the file does nothing. + +I decided to remove the `annex.largefiles` setting, since I don't want this behavior to be "automatic" anymore. So, in one of the two repositories, I ran `git annex unannex todo.org`, and then `git add`, and now I have a regular file back under version control again. + +In the other repository, however, the file goes back to being a file path in the Git tree when I use "git add". Nothing that I do will add the file contents to Git rather than to the Annex, in this strange mode where it's never a symlink on disk, but it's definitely an Annex object file path in the Git tree. + +How do I tell Annex to stop managing this particular file?