rush-git-lfs-plugin
v0.3.4
Published
Rush plugin for git-lfs
Downloads
562
Readme
rush-git-lfs-plugin
A rush plugin that can check if files are correctly managed by Git LFS.
Prerequisite
Rush.js >= 5.83.2
Quick Start
- Enabling this rush plugin
Please follow the official doc to enable this plugin in your repo.
- Running
git-lfs-check
command
# auto detect changed files by "git diff"
rush git-lfs-check
# or you can specify the files that need to be check\
rush git-lfs-check --file <my_file_name>
# you can add --fix option to auto fix incorrect lfs status
Configuration
You can specify which paths should be checked by provided a set of glob patterns and the size threshold can be customized.
JSON Schema For configuration
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Configuration for Rush Git LFS plugin",
"type": "object",
"additionalProperties": false,
"properties": {
"$schema": {
"type": "string",
"default": "http://json-schema.org/draft-04/schema#"
},
"checkPattern": {
"description": "Glob patterns that need to check",
"patternProperties": {
"^.+$": {
"type": "string",
"description": "Customized size threshold for this pattern."
}
}
},
"errorTips": {
"type": "string",
"description": "Tips that shown while there are check errors"
}
}
}
Example Configurations
- Ban all png and dll files
{ "checkPattern": { "**/*.png": -1, "**/*.dll": -1 }, }
- Ban all files that larger than 5MB
{ "checkPattern": { "**/*": 5 * 1024 * 124, }, }
- Ban files in particular folder
{ "checkPattern": { "**/some_folder_path": -1, }, }