prod stable 拉git钱清理子分支 但保持拉取主项目sha 非最新子模块

This commit is contained in:
zhang hongbo 2026-03-25 16:56:08 +08:00
parent ecde2b0e4a
commit f61370a82d
2 changed files with 16 additions and 0 deletions

View File

@ -29,6 +29,14 @@ def call(Map config)
// Git Windows 260
bat 'git config --global core.longpaths true'
}
script {
// checkout
bat '''
if exist .gitmodules (
git submodule foreach --recursive git reset --hard
)
'''
}
checkout([
$class: 'GitSCM',
branches: [[name: '*/USA']], //

View File

@ -33,6 +33,14 @@ def call(Map config)
// Git Windows 260
bat 'git config --global core.longpaths true'
}
script {
// checkout
bat '''
if exist .gitmodules (
git submodule foreach --recursive git reset --hard
)
'''
}
checkout([
$class: 'GitSCM',
branches: [[name: '*/QA']], //