aboutsummaryrefslogtreecommitdiff
path: root/doc/git-annex-unlock.mdwn
blob: b5dcc7e5e7b3b0d1085a73a4bf2f115d744f0b5f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# 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.
Unlocking an annexed file allows it to be modified. This replaces the
symlink for each specified file with the file's content.
You can then modify it and `git annex add` (or `git commit`) to save your
changes.

In repositories with annex.version 5 or earlier, unlocking a file is local
to the repository, and is temporary. With version 6, unlocking a file
changes how it is stored in the git repository (from a symlink to a pointer
file), so you can commit it like any other change. Also in version 6, you
can use `git add` to add a file to the annex in unlocked form. 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, and only in repository version 6.) 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.

# OPTIONS

* file matching options
 
  The [[git-annex-matching-options]](1)
  can be used to specify files to unlock.

* `--json`

  Enable JSON output. This is intended to be parsed by programs that use
  git-annex. Each line of output is a JSON object.

* `--json-error-messages`

  Messages that would normally be output to standard error are included in
  the json instead.

# SEE ALSO

[[git-annex]](1)

[[git-annex-edit]](1)

[[git-annex-add]](1)

[[git-annex-lock]](1)

# AUTHOR

Joey Hess <id@joeyh.name>

Warning: Automatically converted into a man page by mdwn2man. Edit with care.