purge nested git batch, unignore specst

This commit is contained in:
2026-03-17 15:09:08 -06:00
parent 92000dce15
commit ec4cf523fb
4 changed files with 3876 additions and 3 deletions
+39
View File
@@ -0,0 +1,39 @@
@echo off
:: Batch wrapper to run the PowerShell script
:: This script purges nested .git directories and redundant gitignore/gitattributes files
echo ========================================
echo Purge Nested Git Configurationsecho ========================================
echo.
:: Check if running from the correct directory
if not exist ".git" (
echo ERROR: No .git directory found in current folder.
echo Please run this script from your repository root.
pause
exit /b 1
)
echo This will remove all nested .git directories and .gitignore/.gitattributes
echo files from subdirectories, keeping only the root-level ones.
echo.
:: Show dry run first
echo Running DRY RUN first to preview changes...
echo.
powershell -ExecutionPolicy Bypass -File "%~dp0purge-nested-git.ps1" -DryRun
echo.
set /p confirm="Do you want to proceed with deletion? (y/n): "
if /i "%confirm%"=="y" (
echo.
echo Proceeding with deletion...
powershell -ExecutionPolicy Bypass -File "%~dp0purge-nested-git.ps1"
) else (
echo.
echo Cancelled. No changes were made.
)
echo.
pause