From 5f3ca8b7ef278fe8ffa52535f8ef9a48571718ab Mon Sep 17 00:00:00 2001 From: Alex Verkhaturau <1x@tut.by> Date: Tue, 7 Oct 2025 15:20:32 +0300 Subject: [PATCH 1/2] Add 2-lines instructions to backport.ts --- src/backport.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/backport.ts b/src/backport.ts index 8599d00..14d7fb4 100644 --- a/src/backport.ts +++ b/src/backport.ts @@ -174,6 +174,12 @@ const getFailedBackportCommentBody = ({ `git worktree remove ${worktreePath}`, "```", `Then, create a pull request where the \`base\` branch is \`${base}\` and the \`compare\`/\`head\` branch is \`${head}\`.`, + "The same operations in one line (use carefully)", + "```bash", + `git fetch && git worktree add ${worktreePath} ${base} && pushd ${worktreePath} && git switch --create ${head} && git cherry-pick -x --mainline 1 ${commitSha} && git mergetool`, + "# ... and after fixing all conflicts", + `git push --set-upstream origin ${head} && popd && git worktree remove ${worktreePath}`, + "```" ].join("\n"); }; From 04130db4e191747383992a79eafbef693f0ecf19 Mon Sep 17 00:00:00 2001 From: Alex Verkhaturau <1x@tut.by> Date: Tue, 7 Oct 2025 15:26:08 +0300 Subject: [PATCH 2/2] add `git cherry-pick --continue` for more convenience --- src/backport.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backport.ts b/src/backport.ts index 14d7fb4..778717d 100644 --- a/src/backport.ts +++ b/src/backport.ts @@ -178,7 +178,7 @@ const getFailedBackportCommentBody = ({ "```bash", `git fetch && git worktree add ${worktreePath} ${base} && pushd ${worktreePath} && git switch --create ${head} && git cherry-pick -x --mainline 1 ${commitSha} && git mergetool`, "# ... and after fixing all conflicts", - `git push --set-upstream origin ${head} && popd && git worktree remove ${worktreePath}`, + `git cherry-pick --continue && git push --set-upstream origin ${head} && popd && git worktree remove ${worktreePath}`, "```" ].join("\n"); };