Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 4ca4545

Browse files
Fix ReleaseTools to checkout, create, or reset release branch
The option was supposed to be `-B` not `-b`, the former will forcibly reset the local branch instead of failing if it already exists.
1 parent 25e09e4 commit 4ca4545

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

‎tools/ReleaseTools.psm1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -180,8 +180,8 @@ function Update-Branch {
180180
Use-Repository -RepositoryName $RepositoryName -Script {
181181
$Branch = git branch --show-current
182182
if ($Branch -ne "release") {
183-
if ($PSCmdlet.ShouldProcess("release", "git checkout -b")) {
184-
git checkout -b "release"
183+
if ($PSCmdlet.ShouldProcess("release", "git checkout -B")) {
184+
git checkout -B "release"
185185
}
186186
}
187187
}
@@ -389,7 +389,7 @@ function New-ReleasePR {
389389
Use-Repository -RepositoryName $RepositoryName -Script {
390390
if ($PSCmdlet.ShouldProcess("$RepositoryName/release", "git push")) {
391391
Write-Host "Pushing release branch..."
392-
git push --force-with-lease origin release
392+
git push --set-upstream--force-with-lease origin release
393393
}
394394
}
395395

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /