2015-03-23 19:36:10 +00:00
|
|
|
# NAME
|
|
|
|
|
|
|
|
git-annex unlock - unlock files for modification
|
|
|
|
|
|
|
|
# SYNOPSIS
|
|
|
|
|
|
|
|
git annex unlock `[path ...]`
|
|
|
|
|
|
|
|
# DESCRIPTION
|
|
|
|
|
|
|
|
Normally, the content of annexed files is protected from being changed.
|
2020-05-12 13:07:45 +00:00
|
|
|
Unlocking an annexed file allows it to be modified. When no files are
|
|
|
|
specified, all annexed files in the current directory are unlocked.
|
2015-12-10 20:12:05 +00:00
|
|
|
|
2019-08-30 17:54:57 +00:00
|
|
|
Unlocking a file changes how it is stored in the git repository (from a
|
|
|
|
symlink to a pointer file), so this command will make a change that you
|
|
|
|
can commit.
|
|
|
|
|
2019-09-12 17:58:12 +00:00
|
|
|
The content of an unlocked file is still stored in git-annex, not git,
|
|
|
|
and when you commit modifications to the file, the modifications will also
|
|
|
|
be stored in git-annex, with only the pointer file stored in git.
|
|
|
|
|
2021-03-22 19:58:43 +00:00
|
|
|
If you use `git add` to add a file to the annex, it will be added in unlocked form from
|
2019-08-30 17:54:57 +00:00
|
|
|
the beginning. This allows workflows where a file starts out unlocked, is
|
|
|
|
modified as necessary, and is locked once it reaches its final version.
|
|
|
|
|
|
|
|
Normally, unlocking a file requires a copy to be made of its content, so
|
|
|
|
that its original content is preserved, while the copy can be modified. To
|
|
|
|
use less space, annex.thin can be set to true; this makes a hard link to
|
|
|
|
the content be made instead of a copy. (Only when supported by the file
|
|
|
|
system.) While this can save considerable disk space, any modification made
|
|
|
|
to a file will cause the old version of the file to be lost from the local
|
|
|
|
repository. So, enable annex.thin with care.
|
2015-12-27 19:59:59 +00:00
|
|
|
|
2020-05-12 13:07:45 +00:00
|
|
|
# EXAMPLES
|
|
|
|
|
|
|
|
# git annex unlock disk-image
|
|
|
|
# git commit -m "unlocked to allow VM to make changes as it runs"
|
|
|
|
|
|
|
|
# git annex unlock photo.jpg
|
|
|
|
# gimp photo.jpg
|
2021-03-01 17:09:22 +00:00
|
|
|
# git annex add photo.jpg
|
2020-05-12 13:07:45 +00:00
|
|
|
# git annex lock photo.jpg
|
|
|
|
# git commit -m "redeye removal"
|
|
|
|
|
2015-03-23 19:36:10 +00:00
|
|
|
# OPTIONS
|
|
|
|
|
|
|
|
* file matching options
|
|
|
|
|
|
|
|
The [[git-annex-matching-options]](1)
|
|
|
|
can be used to specify files to unlock.
|
|
|
|
|
2017-10-30 18:44:11 +00:00
|
|
|
* `--json`
|
|
|
|
|
|
|
|
Enable JSON output. This is intended to be parsed by programs that use
|
2023-04-25 21:37:34 +00:00
|
|
|
git-annex. Each line of output is a JSON object.
|
2017-10-30 18:44:11 +00:00
|
|
|
|
2018-02-19 18:28:17 +00:00
|
|
|
* `--json-error-messages`
|
|
|
|
|
2023-04-25 21:37:34 +00:00
|
|
|
Messages that would normally be output to standard error are included in
|
|
|
|
the JSON instead.
|
2018-02-19 18:28:17 +00:00
|
|
|
|
2021-05-10 19:00:13 +00:00
|
|
|
* Also the [[git-annex-common-options]](1) can be used.
|
|
|
|
|
2015-03-23 19:36:10 +00:00
|
|
|
# SEE ALSO
|
|
|
|
|
|
|
|
[[git-annex]](1)
|
|
|
|
|
2015-05-29 16:12:55 +00:00
|
|
|
[[git-annex-edit]](1)
|
|
|
|
|
|
|
|
[[git-annex-add]](1)
|
|
|
|
|
|
|
|
[[git-annex-lock]](1)
|
|
|
|
|
2015-03-23 19:36:10 +00:00
|
|
|
# AUTHOR
|
|
|
|
|
|
|
|
Joey Hess <id@joeyh.name>
|
|
|
|
|
|
|
|
Warning: Automatically converted into a man page by mdwn2man. Edit with care.
|