1git-annex-reinject(1)       General Commands Manual      git-annex-reinject(1)
2
3
4

NAME

6       git-annex-reinject - inject content of file back into annex
7

SYNOPSIS

9       git annex reinject [src dest]
10
11       git annex reinject --known [src]
12

DESCRIPTION

14       Moves  the content of the src file or files into the annex.  Only known
15       file contents will be reinjected. Any unknown src files  will  be  left
16       unchanged.
17
18       This  can  be  useful  if  you have obtained the content of a file from
19       elsewhere and want to put it in the local  annex.  For  example,  if  a
20       file's content has been lost and you have a backup, you can restore the
21       backup and reinject it into your local repository.
22
23       There are two ways to use this command. Specifying a src file  and  the
24       name  of  a  dest  file  (located inside the repository's working tree)
25       injects the src file as the content of the dest file.
26
27        git annex reinject /tmp/foo.iso foo.iso
28
29       Or the --known option can be used to  reinject  all  known  src  files,
30       without needing to specify the dest file.
31
32        git annex reinject --known /tmp/*.iso
33

OPTIONS

35       --known
36
37              With  this  option,  each specified src file is hashed using the
38              default key-value backend (or the one specified with --backend),
39              and  if  git-annex has a record of the resulting key having been
40              in the annex before, the content is reinjected.
41
42              Note that, when using a  key-value  backend  that  includes  the
43              filename  extension  in  the key, this will only work if the src
44              files have the same extensions as the files with the  same  con‐
45              tent that was originally added to git-annex.
46
47              Note  that  this  will  reinject old versions of files that have
48              been modified or deleted from the current git branch.  Use  git-
49              annex-unused(1)  to  detect when such old and potentially unused
50              files have been reinjected.
51
52       --backend
53              Specify the key-value backend to use when checking if a file  is
54              known with the --known option.
55

SEE ALSO

57       git-annex(1)
58
59       git-annex-add(1)
60
61       git-annex-unused(1)
62
63       git-annex-fsck(1)
64

AUTHOR

66       Joey Hess <id@joeyh.name>
67
68                                                         git-annex-reinject(1)
Impressum