Skip to content

Commit 9645b65

Browse files
mphomeMichael Pakhantsov
andauthored
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 <[email protected]>
1 parent 67f4330 commit 9645b65

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Commands/Branch.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public static bool DeleteRemote(string repo, string remote, string name)
6262
if (exists)
6363
{
6464
cmd.SSHKey = new Config(repo).Get($"remote.{remote}.sshkey");
65-
cmd.Args = $"push {remote} --delete {name}";
65+
cmd.Args = $"push {remote} --delete refs/heads/{name}";
6666
}
6767
else
6868
{

0 commit comments

Comments
 (0)