prod stable 拉git钱清理子分支 但保持拉取主项目sha 非最新子模块
This commit is contained in:
parent
ecde2b0e4a
commit
f61370a82d
@ -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']], // 分支名
|
||||
|
||||
@ -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']], // 分支名
|
||||
|
||||
Loading…
Reference in New Issue
Block a user