Yahya Uddin
Yahya Uddin

Reputation: 28951

Cannot checkout a file with Git LFS: `unknown command "post-checkout" for "git-lfs"`

When I do the following command while on a feature branch:

git checkout origin/master foo.js

I get the following error:

$ git checkout origin/master foo.js
Error: unknown command "post-checkout" for "git-lfs"
Run 'git-lfs --help' for usage.

Why is this happening and how do I fix this issue?

Update From this question: Cannot use older version of git-lfs on a repo created using latest version it seems like it may be that I am using an older version of Git-LFS on the master branch compared to the feature branch (I may be wrong).

How can I check which version of GIT-LFS is being used for this feature branch?

Upvotes: 1

Views: 1892

Answers (1)

Yahya Uddin
Yahya Uddin

Reputation: 28951

The issue is that v2 has a breaking change.

The solution is to simply update git-lfs!

Upvotes: 2

Related Questions