Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

git lfs checkout fails on 4.1.1 #2110

Closed
oharboe opened this issue Mar 14, 2025 · 1 comment
Closed

git lfs checkout fails on 4.1.1 #2110

oharboe opened this issue Mar 14, 2025 · 1 comment

Comments

@oharboe
Copy link

oharboe commented Mar 14, 2025

I'm getting the error below, which is strange. I would have thought actions/checkout would handle a git repository that already has lfs set up.

Image

      - uses: actions/checkout@v4.1.1
        with:
          ref: ${{ github.event.pull_request.head.sha }}
          fetch-depth: 1
          lfs: true

Output:

/usr/bin/git lfs install --local
Hook already exists: pre-push

	#!/bin/bash
	
	protected_branch='master'
	
	if read local_ref local_sha remote_ref remote_sha; then

I had to add the below or some git lfs files were not checked out properly

      - name: git lfs pull
        run: git lfs pull
@oharboe
Copy link
Author

oharboe commented Mar 15, 2025

The problem is that the hook is under git version control. It is annoying that git lfs requires a hook and that there is a conflict, but the error message is reasonable.

@oharboe oharboe closed this as not planned Won't fix, can't repro, duplicate, stale Mar 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant