blob: 814cc7676a0827f4743445cc62ce590f77d249f1 (
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
|
# NAME
git-annex proxy - safely bypass direct mode guard
# SYNOPSIS
git annex proxy `-- git cmd [options]`
# DESCRIPTION
Only useful in a direct mode repository, this runs the specified git
command with a temporary work tree, and updates the working tree to
reflect any changes staged or committed by the git command.
For example, to revert the most recent change that was committed
to the repository:
git annex proxy -- git revert HEAD
To check out a past version of the repository:
git annex proxy -- git checkout HEAD^^
To rename a directory:
git annex proxy -- git mv mydir newname
To commit the changes to a specific file, first use git annex add to
stage the changes in the index, and then proxy a commit:
git annex add myfile
git annex proxy -- git commit myfile -m foo
Note that git annex proxy cannot be usefully used with git commands that
look at work tree files. For example, it doesn't make sense to proxy "git
add". This is because the temporary work tree used for proxying doesn't
contain all the files that are in the real work tree. However, any unstaged
work tree files are hard linked (or copied) into the temporary work tree,
so that a command like git revert, that will fail if the change it's
making overwrites work tree files, will behave the same when proxied.
# SEE ALSO
[[git-annex]](1)
[[git-annex-direct]](1)
# AUTHOR
Joey Hess <id@joeyh.name>
Warning: Automatically converted into a man page by mdwn2man. Edit with care.
|