简体   繁体   English

git-lfs给出“错误:“ git-lfs”的未知命令“ post-merge””?

[英]git-lfs gives “Error: unknown command “post-merge” for “git-lfs””?

When doing a git pull or fetch/rebase on our server, git prints this warning : 在我们的服务器上执行git pull或fetch / rebase时,git会显示以下警告

Error: unknown command “post-merge” for “git-lfs” 

Interestingly enough, things still work (so git-lfs does its job and fetches large files as expected). 有趣的是,事情仍然有效(因此git-lfs可以完成工作并按预期获取大文件)。

Some online resources suggest that the .git/hooks/commit/post-merge file is at fault, but I checked: all hook files are the same when comparing them to other repos (on my local machine). 一些在线资源表明.git / hooks / commit / post-merge文件有问题,但我检查了一下:将它们与其他存储库(在我的本地计算机上)进行比较时,所有钩子文件都相同。

So how could this be resolved? 那么如何解决呢?

In our case, the reason was simply an outdated version of git-lfs. 在我们的案例中,原因仅仅是git-lfs的过时版本。

Our git/gerrit server, and its infrastructure was updated recently. 我们的git / gerrit服务器及其基础结构最近已更新。

Now we pushed git-lfs to the latest version available (2.51 for our version of Redhat Linux) and the message is gone. 现在,我们将git-lfs推到了可用的最新版本(我们的Redhat Linux版本为2.51),消息消失了。

( I was really surprised to learn that the previous version of git-lfs was showing up as 1.1 ) (得知之前版本的git-lfs显示为1.1时,我感到非常惊讶)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM