0

I am using SmartGit and I can't seem to delete my remote branches. When I try to delete them, it would fail and the error message that I get is along the lines of "Could not delete branch from head". I am not too familiar with git, so am I forgetting to do something before I can delete the branch?

Here is the log from attempting to delete the remote branch.

878099 (2014-04-07 21:50:10,148) [main] INFO q.swt.shellActivation - shell activated Shell {USERNAME - SmartGit/Hg 5.0.8 (for non-commercial use only)}@AFE99B 878099 (2014-04-07 21:50:10,148) [main] INFO q.swt.shellActivation - Activation change from null to Shell {USERNAME - SmartGit/Hg 5.0.8 (for non-commercial use only)}@AFE99B 880880 (2014-04-07 21:50:12,929) [main] INFO
q.action - Performing 'branchDelete, Delete..., Delete the currently selected branch.' menu item from context menu in window org.eclipse.swt.widgets.Shell@AFE99B:Shell {USERNAME - SmartGit/Hg 5.0.8 (for non-commercial use only)} 880882 (2014-04-07 21:50:12,931) [main] INFO q.dialog - Showing dialog 7 (@155F302) '@1C53D4E - Delete' (owner: @AFE99B) 880896 (2014-04-07 21:50:12,945) [main] INFO q.swt.shellActivation - shell deactivated Shell {USERNAME - SmartGit/Hg 5.0.8 (for non-commercial use only)}@AFE99B 880897 (2014-04-07 21:50:12,946) [main] INFO q.swt.shellActivation - shell activated Shell {Delete}@155F302 880897 (2014-04-07 21:50:12,946) [main] INFO q.swt.shellActivation - Activation change from Shell {USERNAME - SmartGit/Hg 5.0.8 (for non-commercial use only)}@AFE99B to Shell {Delete}@155F302 881815 (2014-04-07 21:50:13,864) [main] INFO q.action - Performing 'Delete Also Remotely' button in window @155F302 owner @AFE99B 881815 (2014-04-07 21:50:13,864) [main] INFO q.dialog - Showed dialog 7 (@155F302) '@1C53D4E - Delete' (owner: @AFE99B) 881819 (2014-04-07 21:50:13,868) [main] INFO q.swt.shellActivation - shell activated Shell {USERNAME - SmartGit/Hg 5.0.8 (for non-commercial use only)}@AFE99B 881819 (2014-04-07 21:50:13,868) [main] INFO q.swt.shellActivation - Activation change from Shell {Disposed}@155F302 to Shell {USERNAME - SmartGit/Hg 5.0.8 (for non-commercial use only)}@AFE99B 881845 (2014-04-07 21:50:13,894) [WorkerThread-1] INFO sg.command - Remove branch [CgCommitRef[refs/remotes/origin/BRANCH_NAME]] from smartgit.kX@c3e1af26 for [C:\Users\COMPUTER\USERNAME@1A31360] /. 881870 (2014-04-07 21:50:13,919) [WorkerThread-1] INFO smartgit.core.executable - Executing the following command: "C:\Program Files\Git\bin\git.exe" push --porcelain --progress --recurse-submodules=check origin :refs/heads/BRANCH_NAME 881870 (2014-04-07 21:50:13,919) [WorkerThread-1] INFO smartgit.core.executable - in directory: C:\Users\COMPUTER\USERNAME 882932 (2014-04-07 21:50:14,981) [QThreadPoolThread-6 (smartgit.aIl)] INFO smartgit.server - received command: get-http-credentials 882937 (2014-04-07 21:50:14,986) [QThreadPoolThread-6 (smartgit.aIl)] INFO smartgit.transport.http - Requesting credentials for 6856957067062445309 (userName=USERNAME) 883496 (2014-04-07 21:50:15,545) [QThreadPoolThread-3 (smartgit.fe)] INFO smartgit.command.logging - stderr: error: failed to push some refs to 'GIT_URL_THAT_I_CANT_POST' 883496 (2014-04-07 21:50:15,545) [QThreadPoolThread-0 (smartgit.fe)] INFO smartgit.command.logging - stdout: To GIT_URL_THAT_I_CANT_POST 883497 (2014-04-07 21:50:15,546) [QThreadPoolThread-0 (smartgit.fe)] INFO smartgit.command.logging - stdout: ! :refs/heads/BRANCH_NAME [remote rejected] (deletion prohibited) 883497 (2014-04-07 21:50:15,546) [QThreadPoolThread-0 (smartgit.fe)] INFO smartgit.command.logging - stdout: Done 883498 (2014-04-07 21:50:15,547) [WorkerThread-1] ERROR sg.command - Could not delete BRANCH_NAME from origin. smartgit.ej: Could not delete BRANCH_NAME from origin. at smartgit.ms.a(SourceFile:47) at smartgit.atk.a(SourceFile:54) at smartgit.asl.a(SourceFile:57) at smartgit.asl.a(SourceFile:20) at smartgit.iW.a(SourceFile:85) at smartgit.by.a(SourceFile:42) at smartgit.jQ.run(SourceFile:115) at smartgit.Rn.run(SourceFile:53) 883499 (2014-04-07 21:50:15,548) [main] INFO q.dialogs - Show (warn): Command Failed - Executing a command has failed. 883501 (2014-04-07 21:50:15,550) [main] INFO
q.dialog - Showing dialog 8 (@838C64) '@76207A - Command Failed' (owner: @AFE99B) 883517 (2014-04-07 21:50:15,566) [main] INFO q.swt.shellActivation - shell deactivated Shell {USERNAME - SmartGit/Hg 5.0.8 (for non-commercial use only)}@AFE99B 883517 (2014-04-07 21:50:15,566) [main] INFO q.swt.shellActivation - shell activated Shell {Command Failed}@838C64 883518 (2014-04-07 21:50:15,567) [main] INFO q.swt.shellActivation - Activation change from Shell {USERNAME - SmartGit/Hg 5.0.8 (for non-commercial use only)}@AFE99B to Shell {Command Failed}@838C64 884870 (2014-04-07 21:50:16,919) [main] INFO q.action - Performing 'OK' button in window @838C64 owner @AFE99B 884871 (2014-04-07 21:50:16,920) [main] INFO q.dialog - Showed dialog 8 (@838C64) '@76207A - Command Failed' (owner: @AFE99B) 884874 (2014-04-07 21:50:16,923) [main] INFO q.swt.shellActivation - shell activated Shell {USERNAME - SmartGit/Hg 5.0.8 (for non-commercial use only)}@AFE99B 884875 (2014-04-07 21:50:16,924) [main] INFO q.swt.shellActivation - Activation change from Shell {Disposed}@838C64 to Shell {USERNAME - SmartGit/Hg 5.0.8 (for non-commercial use only)}@AFE99B 885305 (2014-04-07 21:50:17,354) [main] INFO q.swt.shellActivation - shell deactivated Shell {USERNAME - SmartGit/Hg 5.0.8 (for non-commercial use only)}@AFE99B 885307 (2014-04-07 21:50:17,356) [main] INFO q.swt.shellActivation - Activation change from Shell {USERNAME - SmartGit/Hg 5.0.8 (for non-commercial use only)}@AFE99B to null

This question is not a duplicate of the one that a few people claimed as duplicate because I want to know how to do it through SmartGit, not through Git Bash. SmartGit does not provide cmd, or at least I am not aware that it is. People with so many reputation allowed the reputation get to their head and stopped reading all together; what a shame.

jthill
  • 55,082
  • 5
  • 77
  • 137
dalawh
  • 886
  • 8
  • 15
  • 37
  • Can you check what error you get if you use the normal command-line way of deleting a remote branch? That is, `git push origin :branch-name` (assuming the name of the remote you want to delete the branch from is `origin`). – Dolda2000 Apr 06 '14 at 00:53
  • @Dolda2000 How do I use cmd via Smartgit? It seems to be GUI based. – dalawh Apr 06 '14 at 00:56
  • 1
    @AndyLester: It doesn't sound like he's having trouble finding *how* to remove the branch, but rather why he can't in this case. – Dolda2000 Apr 06 '14 at 00:56
  • @AndyLester It is similar, but not the same. – dalawh Apr 06 '14 at 00:56
  • @dalawh: Sorry, I have no clue. I've never seen smartgit before. I was just thinking that normal Git, if you have access to it, would give a more detailed error message, which would actually explain what's wrong. – Dolda2000 Apr 06 '14 at 00:57
  • What's SmartGit? It's not a duplicate, oops I misflagged sorry... – Anubian Noob Apr 06 '14 at 01:41
  • @Dolda2000 I'll see if I can figure it how to access it via cmd. – dalawh Apr 06 '14 at 02:10
  • @AnubianNoob Thanks... can you report it so someone can remove it as a duplicate... – dalawh Apr 06 '14 at 02:10
  • @dalawh wat? I don't understand what you said. Whoever reviews will probably see these comments and decide on the duplicity of this post... You should post something saying that it is or isn't a duplicate. – Anubian Noob Apr 06 '14 at 02:11
  • @AnubianNoob It seems whoever reviewed this has already declared it as a duplicate, which doesn't really help because less people will reply. – dalawh Apr 06 '14 at 02:36
  • Can't believe I had to flag my own question for a mod to look at it... – dalawh Apr 06 '14 at 04:33
  • Please post all relevant output of `log.txt` (from SmartGit's settings directory, see About dialog) after having tried to delete the branch. – mstrap Apr 07 '14 at 08:44
  • @mstrap I added the log to the original post. Hopefully, you can decipher it better than I can. I just read through it again and it seems that deletion is prohibited, so does that mean that the gitweb host is preventing it? – dalawh Apr 08 '14 at 02:07

1 Answers1

1

The log.txtcontains:

! :refs/heads/BRANCH_NAME [remote rejected] (deletion prohibited)

which has been received by Git (from the server). This problem could be related to:

how do I remove a remote branch when I get an error?

You should see the same problem from command line:

"C:\Program Files\Git\bin\git.exe" push --porcelain --progress --recurse-submodules=check origin :refs/heads/BRANCH_NAME
Community
  • 1
  • 1
mstrap
  • 16,808
  • 10
  • 56
  • 86