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

NAME

6       git-annex-smudge - git filter driver for git-annex
7

SYNOPSIS

9       git annex smudge [--clean] file
10
11       git annex smudge --update
12

DESCRIPTION

14       This  command  lets git-annex be used as a git filter driver which lets
15       annexed files in the git repository to be unlocked,  instead  of  being
16       symlinks, and lets git add store files in the annex.
17
18       When  adding  a  file with git add, the annex.largefiles config is con‐
19       sulted to decide if a given file should be added to git  as-is,  or  if
20       its  content  are large enough to need to use git-annex.  The annex.gi‐
21       taddtoannex setting overrides that; setting it to  false  prevents  git
22       add from adding files to the annex.
23
24       However,  if git-annex can tell that a file was annexed before, it will
25       still be added to the annex even when those configs would normally pre‐
26       vent  it.  Two examples of this are adding a modified version of an an‐
27       nexed file, and moving an annexed file to a  new  filename  and  adding
28       that.
29
30       The git configuration to use this command as a filter driver is as fol‐
31       lows.  This is normally set up for you by git-annex init, so you should
32       not need to configure it manually.
33
34        [filter "annex"]
35                smudge = git-annex smudge %f
36                clean = git-annex smudge --clean %f
37
38       To  make  git  use that filter driver, it needs to be configured in the
39       .gitattributes file or in .git/info/attributes. The latter is  normally
40       configured  when  a  repository is initialized, with the following con‐
41       tents:
42
43        * filter=annex
44
45       The smudge filter does not provide git  with  the  content  of  annexed
46       files, because that would be slow and triggers memory leaks in git. In‐
47       stead, it records which worktree files need to be updated, and git  an‐
48       nex smudge --update later updates the work tree to contain the content.
49       That  is  run  by  several  git  hooks,  including  post-checkout   and
50       post-merge.  However,  a  few  git  commands, notably git stash and git
51       cherry-pick, do not run any hooks, so after using  those  commands  you
52       can manually run git annex smudge --update to update the working tree.
53

OPTIONS

55       The git-annex-common-options(1) can be used.
56

SEE ALSO

58       git-annex(1) git-annex-filter-process(1)
59

AUTHOR

61       Joey Hess <id@joeyh.name>
62
63                                                           git-annex-smudge(1)
Impressum