1. 程式人生 > >git 批量 pull 指令碼

git 批量 pull 指令碼

步驟:

1、切換到git目錄;

2、獲取當前分支名;

3、執行pull。

4、指令碼名:gitpull.bat

 

cd C:\Android\Android Project\geek\RF-app

for /f "delims=" %%t in ('git symbolic-ref --short -q HEAD') do set str=%%t

git pull origin %str%

 

cd C:\Android\Android Project\geek\RF-base

for /f "delims=" %%t in ('git symbolic-ref --short -q HEAD') do set str=%%t

git pull origin %str%

 

cd C:\Android\Android Project\geek\RF-inventory

for /f "delims=" %%t in ('git symbolic-ref --short -q HEAD') do set str=%%t

git pull origin %str%

 

cd C:\Android\Android Project\geek\RF-move

for /f "delims=" %%t in ('git symbolic-ref --short -q HEAD') do set str=%%t

git pull origin %str%

 

cd C:\Android\Android Project\geek\RF-onshelf

for /f "delims=" %%t in ('git symbolic-ref --short -q HEAD') do set str=%%t

git pull origin %str%

 

cd C:\Android\Android Project\geek\RF-packagescan

for /f "delims=" %%t in ('git symbolic-ref --short -q HEAD') do set str=%%t

git pull origin %str%

 

cd C:\Android\Android Project\geek\RF-pick

for /f "delims=" %%t in ('git symbolic-ref --short -q HEAD') do set str=%%t

git pull origin %str%

 

cd C:\Android\Android Project\geek\RF-stockquery

for /f "delims=" %%t in ('git symbolic-ref --short -q HEAD') do set str=%%t

git pull origin %str%