new fromkey subcommand, for registering urls, etc
had to redo Annex monad's flag storage
This commit is contained in:
parent
a68e36f518
commit
19fde4960d
13 changed files with 179 additions and 55 deletions
|
@ -7,3 +7,5 @@ For now, we have to manually make the symlink. Something like this:
|
|||
Note the escaping of slashes.
|
||||
|
||||
A `git annex register <url>` command could do this..
|
||||
|
||||
[[done]]
|
||||
|
|
|
@ -4,7 +4,7 @@ git-annex - manage files with git, without checking their contents in
|
|||
|
||||
# SYNOPSIS
|
||||
|
||||
git annex subcommand [path ...]
|
||||
git annex subcommand [params ...]
|
||||
|
||||
# DESCRIPTION
|
||||
|
||||
|
@ -97,6 +97,16 @@ Many git-annex subcommands will stage changes for later `git commit` by you.
|
|||
Fixes up symlinks that have become broken to again point to annexed content.
|
||||
This is useful to run if you have been moving the symlinks around.
|
||||
|
||||
* fromkey file
|
||||
|
||||
This can be used to maually set up a file to link to a specified key
|
||||
in the key-value backend. How you determine an existing key in the backend
|
||||
varies. For the URL backend, the key is just a URL to the content.
|
||||
|
||||
Example:
|
||||
|
||||
git annex fromkey --backend=URL --key=http://www.archive.org/somefile somefile
|
||||
|
||||
# OPTIONS
|
||||
|
||||
* --force
|
||||
|
@ -104,6 +114,15 @@ Many git-annex subcommands will stage changes for later `git commit` by you.
|
|||
Force unsafe actions, such as dropping a file's content when no other
|
||||
source of it can be verified to still exist. Use with care.
|
||||
|
||||
* --backend=name
|
||||
|
||||
Specify the default key-value backend to use, adding it to the front
|
||||
of the list normally configured by `annex.backends`.
|
||||
|
||||
* --key=name
|
||||
|
||||
Specifies a key to operate on, for use with the addkey subcommand.
|
||||
|
||||
## CONFIGURATION
|
||||
|
||||
Like other git commands, git-annex is configured via `.git/config`.
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
A walkthrough of the basic features of git-annex.
|
||||
|
||||
[[!toc]]
|
||||
|
||||
## creating a repository
|
||||
|
||||
This is very straightforward. Just tell it a description of the repository.
|
||||
|
@ -130,3 +134,30 @@ Here you might --force it to drop `important_file` if you trust your backup.
|
|||
But `other.iso` looks to have never been copied to anywhere else, so if
|
||||
it's something you want to hold onto, you'd need to transfer it to
|
||||
some other repository before dropping it.
|
||||
|
||||
## using other backends: manually adding a remote URL
|
||||
|
||||
git-annex has multiple key-value [[backends]]. So far this walkthrough has
|
||||
demonstrated the default, WORM (Write Once, Read Many) backend.
|
||||
|
||||
Another handy backend is the URL backend, which can fetch file's content
|
||||
from remote URLs. Here's how to set up some files in your repository
|
||||
that use this backend:
|
||||
|
||||
# git annex fromkey --backend=URL --key=http://www.archive.org/somefile somefile
|
||||
add somefile ok
|
||||
# git commit -m "added a file from the Internet Archive"
|
||||
|
||||
Now you if you ask git-annex to get that file, it will download it,
|
||||
and cache it locally, until you have it drop it.
|
||||
|
||||
# git annex get somefile
|
||||
get somefile (downloading)
|
||||
#########################################################################100.0%
|
||||
ok
|
||||
|
||||
You can always drop files downloaded by the URL backend. It is assumed
|
||||
that the URL is stable; no local backup is kept.
|
||||
|
||||
# git annex drop somefile
|
||||
drop somefile (ok)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue