Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes14kdownloads
HF_Auto_Sync.bat69 linesDownload Raw Back to scripts
1@echo off2setlocal enabledelayedexpansion3set "ROOT=%~dp0.."4pushd "%ROOT%"5set "ROOT=%cd%"6 7title HUGGING FACE - PRIVATE SYNC8color 0B9 10echo.11echo  #######################################################12echo  #                                                     #13echo  #       HUGGING FACE PRIVATE SYNC (GIT LFS)           #14echo  #                                                     #15echo  #######################################################16echo.17 18:: Check for Git19git --version >nul 2>&120if %errorlevel% neq 0 (21    echo [ERROR] Git is not installed or not in PATH.22    pause23    exit /b24)25 26:: User Input for Repo URL27if not exist ".hf_repo_url" (28    echo [FIRST TIME SETUP]29    set /p repo_url="Enter your Private HF Dataset URL (e.g., https://huggingface.co/datasets/username/repo): "30    echo !repo_url! > ".hf_repo_url"31)32set /p repo_url=<".hf_repo_url"33 34echo [1/4] Initializing Git LFS...35git init >nul 2>&136git lfs install >nul 2>&137 38:: Track large binaries automatically39echo [2/4] Tracking Large Binaries (*.exe, *.dll, *.zip, *.7z)...40git lfs track "*.exe"41git lfs track "*.dll"42git lfs track "*.zip"43git lfs track "*.7z"44git lfs track "*.msi"45git lfs track "*.iso"46git lfs track "*.bin"47git lfs track "*.dat"48git lfs track ".gitattributes"49 50echo [3/4] Adding files to commit...51git remote add origin !repo_url! >nul 2>&152git add .53 54echo [4/4] Pushing to Hugging Face...55set /p msg="Enter update message (default: Update tools): "56if "!msg!"=="" set "msg=Update tools"57 58git commit -m "!msg!"59git branch -M main60git push -u origin main61 62echo.63echo  =======================================================64echo  SUCCESS: Your project is now synced with Hugging Face!65echo  Everything is organized and private.66echo  =======================================================67echo.68pause69 
codekingpro/portable-devtools · Team Ai