diff --git a/doc/bugs/impossible__40____63____41___to_continuously_re-import_a_directory_while_keeping_original_files_in_place/comment_3_300f74178ef17e2e549fd7a04a262428._comment b/doc/bugs/impossible__40____63____41___to_continuously_re-import_a_directory_while_keeping_original_files_in_place/comment_3_300f74178ef17e2e549fd7a04a262428._comment new file mode 100644 index 0000000000..76afcc3b47 --- /dev/null +++ b/doc/bugs/impossible__40____63____41___to_continuously_re-import_a_directory_while_keeping_original_files_in_place/comment_3_300f74178ef17e2e549fd7a04a262428._comment @@ -0,0 +1,59 @@ +[[!comment format=mdwn + username="yarikoptic" + avatar="http://cdn.libravatar.org/avatar/f11e9c84cb18d26a1748c33b48c924b4" + subject="comment 3" + date="2020-10-06T01:26:59Z" + content=""" +I think it worked wonderfully + +
+here is my script I have tried + +```shell +#!/bin/bash + +export PS4='> ' +set -x +set -eu +cd \"$(mktemp -d ${TMPDIR:-/tmp}/dl-XXXXXXX)\" + +mkdir d-in d-repo +echo content >| d-in/file + +function dance() { + git annex import master --from d-in + # but we need to merge it + git merge d-in/master + ls -l + grep -e . * +} + +( +cd d-repo +git init +git annex init +git annex initremote d-in type=directory directory=../d-in exporttree=yes importtree=yes encryption=none + +ls -l ../d-in + +for r in 1 2; do + echo \"Run $r\"; + dance +done + +echo \"more\" >> ../d-in/file +echo \"new\" > ../d-in/newfile +dance + +rm ../d-in/file +dance + +) + +``` +
+ +and it seemed to do the right job! I have not tried to add some `.gitattributes` into that branch it imports into to tell some files to go to git, but I hope it would just work, and if not -- I will come back! feel welcome to close this issue. + +Cheers +"""]]