Skip to main content

A script to find large/binary files and generate Git LFS commands.

Project description

Git LFS Advisor

A simple command-line tool to scan a Git repository, find files suitable for Git LFS, and generate the necessary configuration commands.

This tool helps you quickly set up Git LFS for a new or existing project without manually checking every file.

✨ Features

  • Repository Scan: Scans the entire Git repository to find large or binary files.
  • Custom Rules: Define scanning rules based on file size or file extension.
  • Command Generation: Automatically generates git lfs track and git lfs migrate commands for you to copy and execute.
  • Cross-Platform: Built with Python, it runs on Windows, macOS, and Linux.

📋 What It Does

  1. Scans your repository for large files and binary assets
  2. Analyzes file patterns, sizes, and repository structure
  3. Recommends which files should be tracked by Git LFS
  4. Generates .gitattributes configuration automatically
  5. Provides migration commands and best practices

🎯 Use Cases

  • Setting up LFS for new repositories
  • Optimizing existing repositories with large files
  • Migrating from regular Git to Git LFS
  • Repository cleanup and size optimization
  • CI/CD pipeline integration

📊 Example Output

🔍 Scanning repository...
📁 Found 1,247 files (Total: 2.3 GB)

💡 LFS Recommendations:
  • *.psd files (127 files, 890 MB) → Track with LFS
  • *.mp4 files (23 files, 1.2 GB) → Track with LFS
  • *.zip files (8 files, 156 MB) → Track with LFS

📝 Generated .gitattributes:
  *.psd filter=lfs diff=lfs merge=lfs -text
  *.mp4 filter=lfs diff=lfs merge=lfs -text
  *.zip filter=lfs diff=lfs merge=lfs -text

💾 Potential space savings: ~2.1 GB in Git history

🛠️ Installation

pip install git-lfs-advisor-cli

🤝 Contributing

Contributions are welcome!

⭐ Show Your Support

If this tool helps you manage your Git LFS setup, please give it a star! ⭐


Made with ❤️ for better Git workflows

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

git_lfs_advisor_cli-0.1.0.tar.gz (4.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

git_lfs_advisor_cli-0.1.0-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

Details for the file git_lfs_advisor_cli-0.1.0.tar.gz.

File metadata

  • Download URL: git_lfs_advisor_cli-0.1.0.tar.gz
  • Upload date:
  • Size: 4.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for git_lfs_advisor_cli-0.1.0.tar.gz
Algorithm Hash digest
SHA256 d03344d3b1770bb9bd972a556fad19c7dc06125065965163cd62bfa5a592c525
MD5 82377328802f91faa8a2cbb6ea12885f
BLAKE2b-256 f9d5aa82d71f7321346328d3d3194db602f5e477736b6206511f97fef57ec0a0

See more details on using hashes here.

File details

Details for the file git_lfs_advisor_cli-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for git_lfs_advisor_cli-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 717671643a447786742d6410f83130b559c0de0484ab549321aad11c2b2831ee
MD5 8dd82cf9befeb8f2fa13b74a63239701
BLAKE2b-256 339ebdd1e769dace206b62d62b1869ff24398be6f9f2e73f38f8913d36cadc2f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page