From 9645b65db669af8fa2b5b24df0e2765d0d576182 Mon Sep 17 00:00:00 2001 From: Michael Pakhantsov Date: Fri, 14 Mar 2025 03:26:59 +0200 Subject: [PATCH] Explicitly provided fully qualified reference for the git branch, becase can be exists a tag and a branch with identical names (#1093) Fix push command for branch deletion Updated the `push` command to use `--delete refs/heads/{name}` instead of `--delete {name}` for clearer branch reference when deleting a remote branch. Co-authored-by: Michael Pakhantsov --- src/Commands/Branch.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Commands/Branch.cs b/src/Commands/Branch.cs index 391aeeb2..d56dfa97 100644 --- a/src/Commands/Branch.cs +++ b/src/Commands/Branch.cs @@ -62,7 +62,7 @@ if (exists) { cmd.SSHKey = new Config(repo).Get($"remote.{remote}.sshkey"); - cmd.Args = $"push {remote} --delete {name}"; + cmd.Args = $"push {remote} --delete refs/heads/{name}"; } else {