Created
September 22, 2023 04:16
-
-
Save trinhvanminh/1ed5ffed40d8a83980e5108c81bbd3f9 to your computer and use it in GitHub Desktop.
Work with multiple git repository. Enter branch, enter git command and let it work.
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 | |
set /p branch=Branch (master): | |
set /p git_command=Git command (fetch): | |
if "%branch%"=="" set branch=master | |
if "%git_command%"=="" set git_command=fetch | |
for /d %%i in (%cd%\*) do ( | |
echo ************************************************************************* | |
echo "%%i" | |
cd "%%i" | |
echo ----------------------------------------- | |
git checkout %branch% | |
echo [%branch%] %git_command%ing... | |
git %git_command% | |
echo ----------------------------------------- | |
echo ************************************************************************* | |
) | |
pause |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment