aboutsummaryrefslogtreecommitdiff
path: root/doc/todo
diff options
context:
space:
mode:
authorGravatar http://joeyh.name/ <joey@web>2013-05-19 20:43:44 +0000
committerGravatar admin <admin@branchable.com>2013-05-19 20:43:44 +0000
commit4677ce88887df2c4806e735b456b6fef10c45ecc (patch)
tree770048e524f1555abdc78ab9a47b9c669241a9f9 /doc/todo
parenta030083605336e715c84a74fff81ce3076d8f6ee (diff)
Added a comment
Diffstat (limited to 'doc/todo')
-rw-r--r--doc/todo/wishlist:_remove_files_and_symlinks_but_keep_in_remote/comment_2_8d99c50fc1347367ccc0714e8d1af385._comment40
1 files changed, 40 insertions, 0 deletions
diff --git a/doc/todo/wishlist:_remove_files_and_symlinks_but_keep_in_remote/comment_2_8d99c50fc1347367ccc0714e8d1af385._comment b/doc/todo/wishlist:_remove_files_and_symlinks_but_keep_in_remote/comment_2_8d99c50fc1347367ccc0714e8d1af385._comment
new file mode 100644
index 000000000..f0b20f1a4
--- /dev/null
+++ b/doc/todo/wishlist:_remove_files_and_symlinks_but_keep_in_remote/comment_2_8d99c50fc1347367ccc0714e8d1af385._comment
@@ -0,0 +1,40 @@
+[[!comment format=mdwn
+ username="http://joeyh.name/"
+ nickname="joey"
+ subject="comment 2"
+ date="2013-05-19T20:43:43Z"
+ content="""
+The original poster seems to have a misunderstanding of what git-annex does with the content of files. Deleting a file does not remove the content of the file. You can always use git to check out a previous version of a file, and the content from the annex will still be there (or you can `git annex get` it to get it from whereever git-annex stored the content).
+
+The only exception to this rule is is you, manually, chose to run `git annex unused` and then `git annex dropunused`. That can delete the contents of files, when no branch or tag refers to them. As long as some branch refers to the content of the files, even if it's not the currently checked out branch, the file content is retained.
+
+So a branch *is* the \"index of files that have been removed but are wanted to be kept\".
+
+For example, you could do:
+
+[[!format sh \"\"\"
+git checkout -b keepflacs
+
+cdrom-rip-command
+git annex add *.flac
+git commit -m \"ripped a cd\"
+flac-convert-command
+git annex add *.mp3
+git commit -m \"converted to mp3\"
+
+git checkout master
+git merge keepflacs
+git rm *.flac
+git commit -m \"removed flac files from this branch. They are still available in the keepflacs branch\"
+\"\"\"]]
+
+As long as you always switch to the keepflacs branch to add flac files, and never merge the master branch into keepflacs,
+but only merge keepflacs into master, keepflacs will have every flac file you have ripped. And so git-annex will retain those files
+even when you `git annex unused; git-annex dropunused`.
+
+Or, just make a promise to yourself that you'll never run `git-annex unused`, similarly to how you'd probably never run `rm -rf .git/objects/$rand`, and you don't need the branches; like git, git-annex will retain all data that has ever been checked into it.
+
+(The branches are still a good idea. For one thing, they let you run `git annex fsck` and other repository maintenance commands with the keepflacs branch checked out.)
+
+I am going to move this thread to the [[forum]], because it's not really a TODO item, but is something others may want to read.
+"""]]