问题描述
如果我使用git archive命令从裸GIT存储库导出,我会收到错误消息:
fatal:此操作必须在工作树中运行,导致导出正确。
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报告“致命:此操作必须在工作树中运行”从裸机出口出口?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!