AutoPull.bat
: Executegit pull
inside every git subfolder of the current folderAutoPush.bat
: Executegit add -a
,git commit -m MESSAGE
andgit push
in the current folderbatch.sublime-build
: Simple batch Sublime Text 3 build system
Created
March 27, 2016 04:17
-
-
Save aaossa/5c8cc074989a27f0a70b to your computer and use it in GitHub Desktop.
Batch utilities
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@ECHO OFF | |
REM This bat file iterates on the folders in this directory and | |
REM makes a "git pull" over every folder (only "git repos") | |
FOR /f "delims=" %%D IN ('dir /a:d-h /b') DO ( | |
CD %%~D | |
IF EXIST ".git" ( | |
ECHO Repo: %%D | |
git pull | |
ECHO. | |
) | |
CD .. | |
) | |
PAUSE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@ECHO OFF | |
REM This bat file push changes to your remote repo | |
REM Ignores itself | |
ECHO Automatic git add (-A), commit and push | |
ECHO. | |
SET /p commitMessage="Commit message: " | |
ECHO. | |
git add -A | |
git reset -- AutoPush.bat | |
git commit -m "%commitMessage%" | |
git push | |
ECHO. | |
PAUSE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
{ | |
"cmd": "$file", | |
"working_dir": "$project_path", | |
"windows" : { | |
"shell": true | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment