From 19a4042a81561b087a003ecd52439e6477cf2c7d Mon Sep 17 00:00:00 2001 From: Nico Korthout Date: Tue, 7 Nov 2023 21:32:20 +0100 Subject: [PATCH] fix: suggest git switch over checkout 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. --- src/backport.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backport.ts b/src/backport.ts index 79dd41d..50a4c1a 100644 --- a/src/backport.ts +++ b/src/backport.ts @@ -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(" ")} \`\`\``; }