add a walkthrough section discussing git-annex's skipping of files on noop
This commit is contained in:
parent
ba6cba97d2
commit
de8126ab72
2 changed files with 28 additions and 0 deletions
|
@ -15,6 +15,7 @@ A walkthrough of the basic features of git-annex.
|
|||
walkthrough/modifying_annexed_files
|
||||
walkthrough/using_ssh_remotes
|
||||
walkthrough/moving_file_content_between_repositories
|
||||
walkthrough/quiet_please:_When_git-annex_seems_to_skip_files
|
||||
walkthrough/using_tags_and_branches
|
||||
walkthrough/unused_data
|
||||
walkthrough/fsck:_verifying_your_data
|
||||
|
|
|
@ -0,0 +1,27 @@
|
|||
One behavior of git-annex is sometimes confusing at first, but it turns out
|
||||
to be useful once you get to know it.
|
||||
|
||||
# git annex drop *
|
||||
#
|
||||
|
||||
Why didn't git-annex seem to do anything despite being asked to drop all the
|
||||
files? Because it checked them all, and none of them are present.
|
||||
|
||||
Most git-annex commands will behave this way when they're able to quickly
|
||||
check that nothing needs to be done about a file.
|
||||
|
||||
Running a git-annex command without specifying any file name will
|
||||
make git-annex look for files in the current directory and its
|
||||
subdirectories. So, we can add all new files to the annex easily:
|
||||
|
||||
# echo hi > subdir/subsubdir/newfile
|
||||
# git annex add
|
||||
add subdir/subsubdir/newfile ok
|
||||
|
||||
When doing this kind of thing, having nothing shown for files
|
||||
that it doesn't need to act on is useful because it prevents swamping
|
||||
you with output. You only see the files it finds it does need to act on.
|
||||
|
||||
So remember: If git-annex seems to not do anything when you tell it to, it's
|
||||
not being lazy -- It's checked that nothing needs to be done to get to the
|
||||
state you asked for!
|
Loading…
Reference in a new issue