简体   繁体   中英

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 :

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).

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).

So how could this be resolved?

In our case, the reason was simply an outdated version of git-lfs.

Our git/gerrit server, and its infrastructure was updated recently.

Now we pushed git-lfs to the latest version available (2.51 for our version of Redhat Linux) and the message is gone.

( I was really surprised to learn that the previous version of git-lfs was showing up as 1.1 )

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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