-
-
Save mahi008/a282b99aa7eaab878f85dfa07fc7e808 to your computer and use it in GitHub Desktop.
Commit git with bat file
This file contains hidden or 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 | |
echo type "commit" or "update" | |
cd "curl" | |
set GIT_PATH="C:\Program Files (x86)\Git\bin\git.exe" | |
set BRANCH = "origin" | |
:P | |
set ACTION= | |
set /P ACTION=Action: %=% | |
if "%ACTION%"=="c" ( | |
%GIT_PATH% add -A | |
%GIT_PATH% commit -am "Auto-committed on %date%" | |
%GIT_PATH% pull %BRANCH% | |
%GIT_PATH% push %BRANCH% | |
) | |
if "%ACTION%"=="u" ( | |
%GIT_PATH% pull %BRANCH% | |
) | |
if "%ACTION%"=="exit" exit /b | |
goto P |
This file contains hidden or 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 | |
echo type "commit" or "update" | |
cd "curl" | |
set TGIT_PATH="C:\Program Files\TortoiseGit\bin\TortoiseGitProc.exe" | |
:P | |
set ACTION= | |
set /P ACTION=Action: %=% | |
if "%ACTION%"=="c" ( | |
%TGIT_PATH% /command:commit /logmsg:"Auto-committed on %date%" /closeonend:3 | |
%TGIT_PATH% /command:pull /closeonend:3 | |
%TGIT_PATH% /command:push /closeonend:3 | |
) | |
if "%ACTION%"=="u" ( | |
%TGIT_PATH% /command:pull /closeonend:3 | |
) | |
if "%ACTION%"=="exit" exit /b | |
goto P |
This file contains hidden or 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 | |
echo type "commit" or "update" | |
cd "curl" | |
set GIT_PATH="C:\Program Files (x86)\Git\bin\git.exe" | |
set TGIT_PATH="C:\Program Files\TortoiseGit\bin\TortoiseGitProc.exe" | |
set BRANCH = "origin" | |
:P | |
set ACTION= | |
set /P ACTION=Action: %=% | |
if "%ACTION%"=="c" ( | |
%TGIT_PATH% /command:commit /logmsg:"Auto-committed on %date%" /closeonend:3 | |
%GIT_PATH% pull %BRANCH% | |
%GIT_PATH% push %BRANCH% | |
) | |
if "%ACTION%"=="u" ( | |
%GIT_PATH% pull %BRANCH% | |
) | |
if "%ACTION%"=="exit" exit /b | |
goto P |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment