Before Commit Extension for VS Code
This extension highlights files that exceed a configurable size limit in the Source Control view before committing them.
Features
- Integrates directly with the existing "Changes" view in the Source Control panel
- Displays file sizes in tooltips when hovering over files
- Shows a badge with the count of large files in the "Changes" section
- Updates automatically when files change
- Highlights files that exceed a configurable size limit with a customizable background color
Requirements
- Git must be installed and available in the PATH
- A Git repository must be initialized in the workspace
Usage
- Open a folder containing a Git repository
- Navigate to the Source Control view in VS Code
- Files exceeding the size limit will be highlighted with a red background (configurable)
- Hover over files to see their size information
- The "Changes" section will show a badge with the count of large files
Extension Settings
This extension contributes the following settings:
beforeCommit.sizeLimit : File size limit in MB (default: 100). Files larger than this will be highlighted.
beforeCommit.warningColor : Background color for files that exceed the size limit (default: #ff000033 - semi-transparent red).
License
This project is licensed under the MIT License - see the LICENSE file for details.
| |