From 79adbbadce6b3137f2b5a32472c4146abb6ecdc1 Mon Sep 17 00:00:00 2001 From: Lukey Date: Thu, 25 Mar 2021 18:26:32 +0000 Subject: [PATCH] Added a comment --- ..._1_82efe5c0b37fdcb31b6a4ca62b66123f._comment | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 doc/forum/Is_it_possible_to_cherry_pick_from_a_repo__63__/comment_1_82efe5c0b37fdcb31b6a4ca62b66123f._comment diff --git a/doc/forum/Is_it_possible_to_cherry_pick_from_a_repo__63__/comment_1_82efe5c0b37fdcb31b6a4ca62b66123f._comment b/doc/forum/Is_it_possible_to_cherry_pick_from_a_repo__63__/comment_1_82efe5c0b37fdcb31b6a4ca62b66123f._comment new file mode 100644 index 0000000000..68253107e9 --- /dev/null +++ b/doc/forum/Is_it_possible_to_cherry_pick_from_a_repo__63__/comment_1_82efe5c0b37fdcb31b6a4ca62b66123f._comment @@ -0,0 +1,17 @@ +[[!comment format=mdwn + username="Lukey" + avatar="http://cdn.libravatar.org/avatar/c7c08e2efd29c692cc017c4a4ca3406b" + subject="comment 1" + date="2021-03-25T18:26:30Z" + content=""" +Yes, of course. This is a core feature of git-annex ans is done with [[git-annex-preferred-content]].
+First step is to let the usb drive want anything with `git annex wanted here anything`. Then you need to tell git-annex what files you want on the SSD. There are multiple ways to do that: + +The simplest one is to set the preferred-content expression on the SSD to something like `include=path/to/project_a or include=path/to/project_b or include=...` and so on. + +Or you can just decide manually what files to keep on the SSD with `git annex get`. Then you set the preferred-content expression to just `present`. I think that this should work pretty well with your workflow, since new files will appear first on the SSD and thus are already present. + +Tags are the most complicated way to do this. You basically set the preferred-content expression to something like `metadata=tag=keeponssd`. Then you tag the files you want to keep on the SSD with `git annex metadata --force -t keeponssd path/to/project_a` (--force makes it recursive). The disadvantage is that if you add new files, you have to manually tag them too or else they will be dropped with the next `git annex sync --content --all`. + +To update/sync changes back to the usb drive, you just run `git annex sync --content --all`. With --all, it will also copy old versions of files to the usb drive. +"""]]