19 Zeilen
479 B
Batchfile
19 Zeilen
479 B
Batchfile
@echo off
|
|
echo Finding large files in repository...
|
|
echo.
|
|
|
|
REM Find files larger than 100MB
|
|
echo Files larger than 100MB:
|
|
git ls-files -z | xargs -0 -n1 -I{} -- du -h {} | grep -E "^[0-9]+(M|G)" | sort -hr
|
|
|
|
echo.
|
|
echo To add large files to Git LFS:
|
|
echo 1. git lfs track "*.zip"
|
|
echo 2. git lfs track "*.mp4"
|
|
echo 3. git lfs track "path/to/largefile"
|
|
echo.
|
|
echo Then: git add .gitattributes
|
|
echo git add [large files]
|
|
echo git commit -m "Add LFS tracking"
|
|
echo.
|
|
pause |