Abandon Git LFS because AI Agents
By Justin Poehnelt, Google Workspace alum Published 2 min read
Up until recently I had been using git-lfs with Jules, Google’s AI-assisted coding environment. In the last couple of days, this functionality stopped working and I have decided to ditch git-lfs in favor of standard git.
The problem: Git LFS vs. the sandbox
Git LFS can also fail in other sandboxes, including Project IDX and CI/CD pipelines like Cloud Build.
The environment controls the clone before your custom setup scripts can run. That makes it hard to fix Git LFS configuration before the clone needs it.
1. The proxy conflict (batch API mismatch)
Most corporate environments and cloud IDEs use an internal transparent proxy to cache repository objects and speed up clones.
For example, Jules uses an internal proxy (192.168.0.1:8080) that works for standard Git objects. The Git LFS Batch API uses a different protocol. When the automated clone tries to “smudge” (download) LFS files, the proxy often returns an unexpected EOF or an authentication error because it doesn’t handle LFS traffic.
This isn’t unique to Jules; many corporate proxies choke on the REST API traffic or fail to pass the correct NTLM/Kerberos headers.
2. The security feature: hook lockdown
The bigger issue is likely a deliberate security restriction. Git LFS relies on Git hooks (post-checkout, post-commit) to run the “smudge” filter that replaces pointer files with actual binaries.
Hooks are also a common path for Remote Code Execution (RCE):
- CVE-2020-27955: A critical RCE in LFS allowed malicious repos to execute arbitrary code via
git.baton Windows. - CVE-2025-48384: Similar hook-based vulnerabilities continue to surface.
Because of this risk, secure sandboxes (like Jules, Cloud Build, and strict GitHub Actions runners) often default to a locked-down configuration:
git config --global core.hooksPath /dev/null This breaks Git LFS. When the environment clones your repo, Git ignores the LFS hooks. You end up with a working directory full of tiny pointer files instead of your assets, or the clone hangs while trying to initialize hooks it cannot write.
Abandoning Git LFS
I tried working around this with overrides, skip-smudge flags, and manual lfs pull scripts, but debugging proxy chains and hook permissions in every new environment wasn’t worth the trouble.
I decided to abandon Git LFS. My files (mostly blog images) are small enough for standard Git, and a plain git clone works everywhere.
How to migrate back to standard Git
If you’re stuck in this trap, here is how you move the files back into your main Git history using git-filter-repo:
# 1. Pull everything local (on a machine where LFS still works!)
git lfs pull
# 2. Export LFS objects back to standard Git
git lfs migrate export --everything --include="*.png,*.jpg,*.jpeg,*.gif"
# 3. Cleanup
rm .gitattributes
git add .
git commit -m "chore: migrate assets to standard Git" Warning: This rewrites your Git history. You will need to git push --force to your origin, and any other collaborators will need to re-clone.
Result
Jules and other sandboxes can now clone my blog in seconds without any Git configuration in my setup script.