force
This commit is contained in:
parent
b18915e75d
commit
b502695b25
6
.github/workflows/mirror.yml
vendored
6
.github/workflows/mirror.yml
vendored
@ -21,13 +21,13 @@ jobs:
|
|||||||
git config --global user.name shenjack-action
|
git config --global user.name shenjack-action
|
||||||
git remote add gitea http://shenjack.top:5100/ARS/ars-tools.git
|
git remote add gitea http://shenjack.top:5100/ARS/ars-tools.git
|
||||||
git fetch gitea
|
git fetch gitea
|
||||||
$branches = git branch -r | Select-String -Pattern 'origin'
|
$branches = git branch -r | Select-String -Pattern 'gitea'
|
||||||
foreach ($branch in $branches) {
|
foreach ($branch in $branches) {
|
||||||
$branchName = $branch -replace 'origin/', ''
|
$branchName = $branch -replace 'gitea/', ''
|
||||||
$branchName = $branchName.Trim()
|
$branchName = $branchName.Trim()
|
||||||
if (!(git branch | Select-String -Pattern $branchName)) {
|
if (!(git branch | Select-String -Pattern $branchName)) {
|
||||||
git branch --track $branchName $branch.Trim()
|
git branch --track $branchName $branch.Trim()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
git pull --all
|
git pull --all
|
||||||
git push origin --all
|
git push origin --all --force
|
Loading…
Reference in New Issue
Block a user