c_101/提取指定更新.bat

31 lines
468 B
Batchfile
Raw Normal View History

2024-12-05 06:09:43 +00:00
@echo off
:: <20>л<EFBFBD><D0BB><EFBFBD><EFBFBD>ű<EFBFBD><C5B1><EFBFBD><EFBFBD><EFBFBD>Ŀ¼
cd /d %~dp0
:: <20><><EFBFBD>¼<EFBFBD>¼
git fetch
:: <20><>ʾ<EFBFBD>û<EFBFBD><C3BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ĺ<EFBFBD>ϣֵ
set /p hash=<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ŀ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ĺ<EFBFBD>ϣֵ<EFBFBD><EFBFBD>
:: <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƿ<EFBFBD>Ϊ<EFBFBD><CEAA>
if "%hash%"=="" (
echo <20><><EFBFBD>󣺹<EFBFBD>ϣֵ<CFA3><D6B5><EFBFBD><EFBFBD>Ϊ<EFBFBD>գ<EFBFBD>
pause
exit /b
)
:: ִ<><D6B4> git cherry-pick <20><><EFBFBD>ָ<EEB2A2><D6B8><EFBFBD><EFBFBD>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
git cherry-pick %hash% -X theirs
:: <20><><EFBFBD><EFBFBD> cherry-pick <20>Ƿ<EFBFBD><C7B7>ɹ<EFBFBD>
if %errorlevel% equ 0 (
echo cherry-pick <20>ɹ<EFBFBD><C9B9><EFBFBD>
) else (
echo cherry-pick ʧ<>ܣ<EFBFBD><DCA3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD>ϣֵ<CFA3>Ƿ<EFBFBD><C7B7><EFBFBD>ȷ<EFBFBD><C8B7>
)
pause