git-annex/doc/walkthrough/renaming_files.mdwn
https://www.google.com/accounts/o8/id?id=AItOawnG_weCiH6IleQfVmRPmFJflHQMHdAcDkU 54f3ff878c add a note about direct mode
2014-07-25 07:57:21 +00:00

19 lines
741 B
Markdown

# cd ~/annex
# git mv big_file my_cool_big_file
# mkdir iso
# git mv debian.iso iso/
# git commit -m moved
You can use any normal git operations to move files around, or even
make copies or delete them.
Notice that, since annexed files are represented by symlinks,
the symlink will break when the file is moved into a subdirectory.
But, git-annex will fix this up for you when you commit --
it has a pre-commit hook that watches for and corrects broken symlinks.
## Direct mode
Note that these git commands only work when git-annex is using indirect mode. Repositories created by the [[assistant]] are in [[direct_mode]]. Running 'git mv' in direct mode will give you an error:
fatal: This operation must be run in a work tree