Skip to content

Commit 24bc957

Browse files
committed
Add Git LFS pre-push hook to Overcommit
- Ensures LFS objects are pushed automatically with commits - Prevents CI/CD failures due to missing LFS objects - Works correctly with forks and different remotes
1 parent b167114 commit 24bc957

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

.overcommit.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,12 @@ PreCommit:
2424
description: 'Update appraisal gemfiles'
2525
command: ['bundle', 'exec', 'appraisal', 'update']
2626

27+
PrePush:
28+
GitLfs:
29+
enabled: true
30+
description: 'Push LFS objects to remote'
31+
command: ['bash', '-c', 'git lfs pre-push "$@"', '--']
32+
2733
PostCheckout:
2834
ALL: # Special hook name that customizes all hooks of this type
2935
quiet: true # Change all post-checkout hooks to only display output on failure

0 commit comments

Comments
 (0)