Ask before installing git-lfs hooks
See original GitHub issueDescription
Adding a git repo which already exists on the file system to the GitHub Desktop results in new hooks post-checkout
post-commit
post-merge
pre-push
. These all call git lfs
. This is fine, as long as the user interacts with the repository exclusively with GitHub Desktop, but they cause problem if git LFS is not installed on the computer otherwise and the user tries to interact with it with git
.
Version
GitHub Desktop version: 0.8.2
OS version:
Darwin * 16.7.0 Darwin Kernel Version 16.7.0: Thu Jun 15 17:36:27 PDT 2017; root:xnu-3789.70.16~2/RELEASE_X86_64 x86_64
Steps to Reproduce
- Create a git repo
- Add it to Desktop
- Remove
git-lfs
from$PATH
- Go to the git repo directory, and call
git commit
orgit push
Expected behavior:
The command succeeds.
Actual behavior:
$ git push origin ha-script-assert
This repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting .git/hooks/pre-push.
error: failed to push some refs to 'https://github.com/travis-ci/travis-build.git'
Reproduces how often:
100%
Logs
Additional Information
This reinstates https://github.com/desktop/desktop/issues/2236.
Issue Analytics
- State:
- Created 6 years ago
- Comments:9 (4 by maintainers)
Top Results From Across the Web
Git LFS - large file storage | Atlassian Git Tutorial
Git LFS is a Git extension that improves handling of large files by lazily downloading the needed versions during checkout, rather than during...
Read more >git-lfs: how to enforce git lfs installation? - Stack Overflow
I work on a git-lfs repository. Some colleagues occasionally need to update large binary files in this repository (hence git-lfs).
Read more >Git Large File Storage
Step 4. Add Git LFS hooks to the repository. In your repository direcotry, run. $git lfs install. You'll need to run this in...
Read more >Why and How to Use Git LFS - DZone
Updated git hooks. ... Git LFS initialized. ... Navigate to the directory mygitlfsplanet/.git/hooks . The following hooks have been added/updated ...
Read more >Git Large File Storage (LFS) - GitLab Docs
Git LFS client communicates with the GitLab server over HTTPS. It uses HTTP Basic Authentication to authorize client requests. After the request is ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
You’d see that modal only if you added a repository that was already using LFS. But the way we checked if you were using LFS always added the hook :hurtrealbad:
is this only on mac?