question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Ask before installing git-lfs hooks

See original GitHub issue

Description

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

  1. Create a git repo
  2. Add it to Desktop
  3. Remove git-lfs from $PATH
  4. Go to the git repo directory, and call git commit or git 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:closed
  • Created 6 years ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
joshabercommented, Sep 14, 2017

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:

0reactions
ghostcommented, Nov 21, 2017

is this only on mac?

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found