universe/commit.cmd

19 lines
293 B
Batchfile

@echo off
for /D %%G in (%CD%\*) do if exist %%G\.git (
cd %%G
set RESULT=
for /f %%i in ('git status -s') do (set RESULT=%%i)
if defined RESULT (
git add %*
git commit %*
set ANY=1
)
cd ..
)
if defined ANY (
git add .
git commit %*
)