Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EGit / JGit » Unable to delete remote branch
Unable to delete remote branch [message #1736241] Mon, 27 June 2016 19:17
Eric Walker is currently offline Eric WalkerFriend
Messages: 1
Registered: June 2016
Junior Member
I'm trying to use jgit to essentially do:

# git branch -d <branchToDelete>
# git push origin :<branchToDelete>

From what I've read on stack overflow, it seems like this was supported at one point, but

// Delete the local branch
git.branchDelete().setBranchNames("refs/heads/<branchToDelete>").call();
// Push the changes to the remote
RefSpec refSpec = new RefSpec(":refs/heads/<branchToDelete>");
PushCommand push = git.push().setRefSpecs(refSpec).setRemote("origin").call();

is only deleting the branch locally, and the pushResult message is just "". Thoughts on why this isn't working?
Previous Topic:Unable to pull - Attempted to beginRule: R/, does not match outer scope rule: MultiRule
Next Topic:[jgit] git archive remote file
Goto Forum:
  


Current Time: Thu Apr 25 22:33:01 GMT 2024

Powered by FUDForum. Page generated in 0.03076 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top