summaryrefslogtreecommitdiff
path: root/doc/git-annex-smudge.mdwn
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2015-12-04 17:57:15 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2015-12-04 17:57:15 -0400
commitcf9af38cf75618e2953c5b537d8f7c1fe353aa63 (patch)
treeb5945e5f46eab01366ab3ddbe96662f9b8d96aa3 /doc/git-annex-smudge.mdwn
parent93eaf6d6d018fe9df5b985e47300f549e4b04709 (diff)
init: Configure .git/info/attributes to use git-annex as a smudge filter.
Note that this changes the default behavior of git add in a newly initialized repository; it will add files to the annex. Don't like that this could break workflows, but it's necessary in order for any pointer files in the repo to be handled by git-annex.
Diffstat (limited to 'doc/git-annex-smudge.mdwn')
-rw-r--r--doc/git-annex-smudge.mdwn24
1 files changed, 15 insertions, 9 deletions
diff --git a/doc/git-annex-smudge.mdwn b/doc/git-annex-smudge.mdwn
index 5186d2a17..c8e545367 100644
--- a/doc/git-annex-smudge.mdwn
+++ b/doc/git-annex-smudge.mdwn
@@ -12,24 +12,30 @@ This command lets git-annex be used as a git filter driver which lets
annexed files in the git repository to be unlocked at all times, instead
of being symlinks.
-The git configuration to use this command as a filter driver is as follows,
-but this is normally set up for you by git-annex init, so you should
-not need to configure it manually:
+When adding a file with `git add`, the annex.largefiles config is
+consulted to decide if a given file should be added to git as-is,
+or if its content are large enough to need to use git-annex. To force a
+file that would normally be added to the annex to be added to git as-is,
+this can be temporarily overridden. For example:
+
+ git -c annex.largefiles='exclude=*' add myfile
+
+The git configuration to use this command as a filter driver is as follows.
+This is normally set up for you by git-annex init, so you should
+not need to configure it manually.
[filter "annex"]
smudge = git-annex smudge %f
clean = git-annex smudge --clean %f
-To make git use this filter on all files except for dotfiles, put something
-like the following in the .gitattributes file:
+To make git use that filter driver, it needs to be configured in
+the .gitattributes file or in `.git/config/attributes`. The latter
+is normally configured when a repository is initialized, with the following
+contents:
* filter=annex
.* !filter
-When adding a file with `git add`, the annex.largefiles config is
-consulted to decide if a given file should be added to git as-is,
-or if its content are large enough to need to use git-annex.
-
# SEE ALSO
[[git-annex]](1)