Skip to content

fix: push Git LFS objects before pushing the localization branch - #324

Merged
andrii-bodnar merged 1 commit into
masterfrom
fix/lfs-push
Nov 2, 2026
Merged

andrii-bodnar merged 1 commit into
masterfrom
fix/lfs-push

Conversation

@andrii-bodnar

Copy link
Copy Markdown
Member

Closes #323

Problem

push_to_branch pushes with git push --no-verify, which also skips the Git LFS pre-push hook, the hook that uploads LFS objects. When translation files are tracked by LFS (and the checkout uses lfs: true), git add . stores them as LFS pointers, but their objects never reach the server. GitHub then rejects the push:

remote: error: GH008: Your push referenced at least 1 unknown Git LFS object

Fix

  • If the commit contains LFS files (git lfs ls-files is non-empty), run git lfs push "${REPO_URL}" "${BRANCH}" before the push. Its exit code feeds RESULT like the other git steps.
  • --no-verify stays, so user hooks (husky etc.) are still skipped, as intended in fix: Ignore githooks #53.
  • Repositories without LFS are unaffected: the check is empty and the step is skipped.
  • Docs: added a "Repositories with Git LFS" example (actions/checkout with lfs: true) to docs/EXAMPLES.md.

`git push --no-verify` skips the Git LFS pre-push hook, so translation
files tracked by LFS were committed as pointers without their objects
being uploaded, and GitHub rejected the push with GH008.

Run `git lfs push` explicitly when the commit contains LFS files.

Closes #323

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@andrii-bodnar
andrii-bodnar merged commit 5b9790d into master Nov 2, 2026
2 checks passed
@andrii-bodnar
andrii-bodnar deleted the fix/lfs-push branch November 2, 2026 10:59
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

Successfully merging this pull request may close these issues.

Failure on git push with LFS

2 participants