0

"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."

I've never heard of git-LFS, much less installed it, before. This repository was pushing to heroku just fine for 2+ years.

I recently made a new fork so I could try upgrading to rails 5.2 and ruby 2.4. I got it all sorted and pulled my master FROM that fork, so my master is now rails 5.2 and ruby 2.4.

But I can't push it to heroku because of the above error.

I have no idea where git-LFS came from. I never installed it, and now I don't know how to get rid of it.

If anyone knows why I can't push to heroku, or how to disable this git-LFS (that feels like malware), please let me know! I've been searching for hours :(

C.OG
  • 6,236
  • 3
  • 20
  • 38
Nick
  • 63
  • 6

2 Answers2

1

Git LFS is an extension to Git that provides better handling of large files than native Git. When you use it in a repository, it installs hooks to ensure that the LFS files are pushed when you push your repository.

You should check your repository for a .gitattributes file. If there is one, and it contains entries that say filter=lfs, then your repository is using it to store large files. If not, then you can fix this by removing the hook in .git/hooks/pre-push, as the message says.

You haven't specified what operating system you're using or where you get your software from, so I can't tell you how it likely got installed, but it is currently removed from your system, which is why you see the message. It may have been installed through your system package manager, such as dpkg or Homebrew. If you're running on Windows, it's shipped as a standard part of Git for Windows.

bk2204
  • 64,793
  • 6
  • 84
  • 100
0

I'm on a Mac. It really was as simple as deleting that file. It didn't occur to me at first that it was literally just a file in a folder on my hard drive because files and folders don't start with a period. And everything I'd read said to delete it from my repository; I read that and I'm thinking it's on github somewhere, not my local drive. Then I looked in my app's folder and saw a .git folder at the top, and from there it was obvious.

Nick
  • 63
  • 6
  • 1
    Files and directories absolutely can start with a period. That makes them hidden on UNIX-like systems. And remember, your git repository is tracked through the .git directory; GitHub is just a fancy way of visualizing that with a few value-add components. – anothermh Jul 24 '19 at 02:06