为什么赢得git附件死?

时间:2018-01-25 03:42:04

标签: git git-annex

年龄前(几个月,无论如何)我在存储库中初始化了git-annex,原因现在让我感到厌烦。我以为我设法摆脱它,但今天我发现它仍然存在,存储库中的任何新目录都是"附加" - 如果我在repo中的任何地方创建一个新文件,我可以编辑一次,然后一旦我保存,它就存储为git-annex对象:

index.html -> ../.git/annex/objects/z3/gQ/SHA256E-s17--a58d9605c9c692e1df6adbed7e3e5bd7655345326d0297b55fd1faa13ae16fbb.html/SHA256E-s17--a58d9605c9c692e1df6adbed7e3e5bd7655345326d0297b55fd1faa13ae16fbb.html

我在Remove git-annex repository from file tree阅读了说明,并尝试了git annex uninit,这让我知道了这一点:

amanda@mona:talks$ git annex uninit
unannex 2018/test/Untitled Document ok
unannex 2018/test/index.html ok
unannex test/index.html ok
git-annex: Not fully uninitialized
Some annexed data is still left in .git/annex/objects/
This may include deleted files, or old versions of modified files.

If you don't care about preserving the data, just delete the
directory.

Or, you can move it to another location, in case it turns out
something in there is important.

Or, you can run `git annex unused` followed by `git annex dropunused`
to remove data that is not used by any tag or branch, which might
take care of all the data.

Then run `git annex uninit` again to finish.

所以我删除了.git/annex并再次运行git annex uninit。试图创建一个新文件,...它是一个git附件对象。我觉得我被沼泽的东西困扰着。我怎么能让它死?

我尝试在Synaptic中完全删除git-annex,但是,新文件会立即转换为.git/annex/

中的对象

2 个答案:

答案 0 :(得分:0)

仔细检查当前Git仓库中是否有任何钩子

cd /path/to/my/repo/.git/hooks

同时检查git本身是否为包装脚本。

查找git-annexwhich git-annex)可执行文件并将其删除

答案 1 :(得分:0)

多次运行git annex unannex(看起来像是要解决问题),手动删除钩子并重新创建新文件,然后复制并粘贴内容,最终我只是通过克隆为我修复了它存储库,并用实际文件替换git附件链接。