aboutsummaryrefslogtreecommitdiff
path: root/doc/bugs/git_annex_import_is_dangerous_if_you_have_unused_objects
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2017-03-02 17:24:49 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2017-03-02 17:24:49 -0400
commit998cc17b986c85d75b06479765fb980e4f475ba8 (patch)
treeb3176a4bd513e248d0cfa99f2d58f4962e9812ff /doc/bugs/git_annex_import_is_dangerous_if_you_have_unused_objects
parentb0aef7cd30caa2c5839fac5e2d5089c9be56b686 (diff)
show how this is not specific to git-annex at all
Diffstat (limited to 'doc/bugs/git_annex_import_is_dangerous_if_you_have_unused_objects')
-rw-r--r--doc/bugs/git_annex_import_is_dangerous_if_you_have_unused_objects/comment_1_9f9d5c18c27dfd33a5bf2c593ee65b58._comment31
1 files changed, 31 insertions, 0 deletions
diff --git a/doc/bugs/git_annex_import_is_dangerous_if_you_have_unused_objects/comment_1_9f9d5c18c27dfd33a5bf2c593ee65b58._comment b/doc/bugs/git_annex_import_is_dangerous_if_you_have_unused_objects/comment_1_9f9d5c18c27dfd33a5bf2c593ee65b58._comment
new file mode 100644
index 000000000..aac409e98
--- /dev/null
+++ b/doc/bugs/git_annex_import_is_dangerous_if_you_have_unused_objects/comment_1_9f9d5c18c27dfd33a5bf2c593ee65b58._comment
@@ -0,0 +1,31 @@
+[[!comment format=mdwn
+ username="joey"
+ subject="""comment 1"""
+ date="2017-03-02T21:20:02Z"
+ content="""
+A simpler way to get to the same end result, without using git-annex
+import:
+
+ mv ~/foo .
+ git annex add foo
+ git reset --hard
+
+Now "foo" is only present in the git-annex object store, and we don't
+know what its filename(s) were.
+
+A way to get to the same end result, without using git-annex:
+
+ mv ~/foo .
+ git add foo
+ git reset --hard
+
+Now "foo" is only present in the git object store, and we don't
+know what its filename(s) were.
+
+So, it's not `git-annex import`, or `git-annex add`, or `git add`
+that is dangerous here. It's `git reset --hard`.
+
+git will happily lose lots of data until you commit it. Once it's
+committed, it's safe. That's the rule of thumb. Nothing much that git-annex
+can do about that.
+"""]]