summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2012-03-24 19:46:11 -0400
committerGravatar Joey Hess <joey@kitenet.net>2012-03-24 19:46:11 -0400
commitef74908fe795989afb0c1a9115916ae9c9380b06 (patch)
treecf0d4cbaeb8489b3c7a2208ea369f4eea6cdf6d8
parent63d3b2a62e9cdb4c75d6ee3762546d937f58606c (diff)
expand
-rw-r--r--doc/tips/using_the_web_as_a_special_remote.mdwn25
1 files changed, 25 insertions, 0 deletions
diff --git a/doc/tips/using_the_web_as_a_special_remote.mdwn b/doc/tips/using_the_web_as_a_special_remote.mdwn
index a151f9933..24ded90c0 100644
--- a/doc/tips/using_the_web_as_a_special_remote.mdwn
+++ b/doc/tips/using_the_web_as_a_special_remote.mdwn
@@ -30,3 +30,28 @@ With the result that it will hang onto files:
00000000-0000-0000-0000-000000000001 -- web
(Use --force to override this check, or adjust annex.numcopies.)
failed
+
+You can also add urls to any file already in the annex:
+
+ # git annex addurl --file my_cool_big_file http://example.com/cool_big_file
+ addurl my_cool_big_file ok
+ # git annex whereis my_cool_big_file
+ whereis my_cool_big_file (2 copies)
+ 00000000-0000-0000-0000-000000000001 -- web
+ 27a9510c-760a-11e1-b9a0-c731d2b77df9 -- here
+
+To add a lot of urls at once, just list them all as parameters to
+`git annex addurl`.
+
+If you're adding a bunch of related files to a directory, or just don't
+like the default filenames generated by `addurl`, you can use `--pathdepth`
+to specify how many parts of the url are put in the filename.
+A positive number drops that many paths from the beginning, while a negative
+number takes that many paths from the end.
+
+ # git annex addurl http://example.com/videos/2012/01/video.mpeg
+ addurl example.com_videos_2012_01_video.mpeg (downloading http://example.com/videos/2012/01/video.mpeg)
+ # git annex addurl http://example.com/videos/2012/01/video.mpeg --pathdepth=2
+ addurl 2012_01_video.mpeg (downloading http://example.com/videos/2012/01/video.mpeg)
+ # git annex addurl http://example.com/videos/2012/video.mpeg --pathdepth=-2
+ addurl 01_video.mpeg (downloading http://example.com/videos/2012/01/video.mpeg)