Skip to content

Commit

Permalink
fix: suggest git switch over checkout
Browse files Browse the repository at this point in the history
The switch command has been around for 4 years now, and while still
marked as experimental, I think it's fine to "switch" to it in the
suggestion for local cherry-picking. It's unlikely that users are using
such old git versions that it doesn't support git switch --create.
  • Loading branch information
korthout committed Nov 7, 2023
1 parent 4fed997 commit 19a4042
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/backport.ts
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ export class Backport {
git fetch origin ${target}
git worktree add -d .worktree/${branchname} origin/${target}
cd .worktree/${branchname}
git checkout -b ${branchname}
git switch --create ${branchname}
git cherry-pick -x ${commitShasToCherryPick.join(" ")}
\`\`\``;
}
Expand Down

0 comments on commit 19a4042

Please sign in to comment.