2015-03-25 16:09:49 +00:00
|
|
|
# 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
|
|
|
|
|
2015-07-03 18:10:00 +00:00
|
|
|
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
|
|
|
|
|
2015-08-04 18:37:43 +00:00
|
|
|
The temporary work tree that the git command is run in is set up by
|
|
|
|
checking out all files that are in the index, and copying (or hard linking)
|
|
|
|
any unstaged files from the real work tree. Since the git command is run
|
|
|
|
using this temporary work tree, it won't see eg, local modifications to
|
|
|
|
files. So, it probably is not useful to proxy a command like "git add".
|
|
|
|
However, you can use the proxy with any git command you like, as long as
|
|
|
|
you think about how it will interact with the temporary work tree.
|
2015-08-04 18:01:59 +00:00
|
|
|
|
2015-03-25 16:09:49 +00:00
|
|
|
# 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.
|