为什么GIT报告“致命:这个操作必须在工作树中运行"?从裸仓库导出时? [英] Why GIT reports "fatal: This operation must be run in a work tree" when exporting from bare repo?
问题描述
如果我使用 git archive 命令从裸 GIT 存储库导出,我会收到错误消息:致命:此操作必须在工作树中运行",尽管导出正确通过.
if I export from bare GIT repository using git archive command I get error message: "fatal: This operation must be run in a work tree", altough the export passes properly.
所以我的问题是:从裸存储库导出时有什么问题吗?我检查了导出的存档,看起来没问题.
So my question is: Is there any issue when exporting from bare repository? I checked the exported archive and it looks alright.
推荐答案
我实际上没有收到该警告 - 我相当确定这是一个错误,在您使用的版本之后的某个时间已解决.我不知道确切的时间,因为我根本没有设法重现它(我尝试了 v1.5.3.4、v1.6.2 和当前主版本的构建.)
I don't actually get that warning - I'm fairly certain it was a bug which was resolved sometime after the version you're using. I can't tell exactly when, because I haven't even managed to reproduce it at all (I tried v1.5.3.4, v1.6.2, and a build from current master.)
这篇关于为什么GIT报告“致命:这个操作必须在工作树中运行"?从裸仓库导出时?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!