1# NAME
2
3git-annex reinject - inject content of file back into annex
4
5# SYNOPSIS
6
7git annex reinject `[src dest]`
8
9git annex reinject --known `[src]`
10
11# DESCRIPTION
12
13Moves the content of the src file or files into the annex.
14Only known file contents will be reinjected. Any unknown src files will
15be left unchanged.
16
17This can be useful if you have obtained the content of a file from
18elsewhere and want to put it in the local annex. For example, if a file's
19content has been lost and you have a backup, you can restore the backup and
20reinject it into your local repository.
21
22There are two ways to use this command. Specifying a src file and the name
23of a dest file (located inside the repository's working tree)
24injects the src file as the content of the dest file.
25
26	git annex reinject /tmp/foo.iso foo.iso
27
28Or the `--known` option can be used to reinject all known src files, without
29needing to specify the dest file.
30
31	git annex reinject --known /tmp/*.iso
32
33# OPTIONS
34
35* `--known`
36
37  With this option, each specified src file is hashed using the default
38  key-value backend (or the one specified with `--backend`), and if git-annex
39  has a record of the resulting key having been in the annex before, the
40  content is reinjected.
41
42  Note that, when using a key-value backend that includes the filename
43  extension in the key, this will only work if the src files have the same
44  extensions as the files with the same content that was originally added
45  to git-annex.
46
47  Note that this will reinject old versions of files that have been
48  modified or deleted from the current git branch.
49  Use [[git-annex-unused]](1) to detect when such old and potentially
50  unused files have been reinjected.
51
52* `--backend`
53
54  Specify the key-value backend to use when checking if a file is known
55  with the `--known` option.
56
57* Also the [[git-annex-common-options]](1) can be used.
58
59# SEE ALSO
60
61[[git-annex]](1)
62
63[[git-annex-add]](1)
64
65[[git-annex-unused]](1)
66
67[[git-annex-fsck]](1)
68
69# AUTHOR
70
71Joey Hess <id@joeyh.name>
72
73Warning: Automatically converted into a man page by mdwn2man. Edit with care.
74