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 trackandgit lfs migratecommands for you to copy and execute. - Cross-Platform: Built with Python, it runs on Windows, macOS, and Linux.
📋 What It Does
- Scans your repository for large files and binary assets
- Analyzes file patterns, sizes, and repository structure
- Recommends which files should be tracked by Git LFS
- Generates
.gitattributesconfiguration automatically - 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d03344d3b1770bb9bd972a556fad19c7dc06125065965163cd62bfa5a592c525
|
|
| MD5 |
82377328802f91faa8a2cbb6ea12885f
|
|
| BLAKE2b-256 |
f9d5aa82d71f7321346328d3d3194db602f5e477736b6206511f97fef57ec0a0
|
File details
Details for the file git_lfs_advisor_cli-0.1.0-py3-none-any.whl.
File metadata
- Download URL: git_lfs_advisor_cli-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
717671643a447786742d6410f83130b559c0de0484ab549321aad11c2b2831ee
|
|
| MD5 |
8dd82cf9befeb8f2fa13b74a63239701
|
|
| BLAKE2b-256 |
339ebdd1e769dace206b62d62b1869ff24398be6f9f2e73f38f8913d36cadc2f
|