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:multiple git repositories in a single Eclipse project?
Next Topic:Could not initialize class org.eclipse.jgit.util.FS
Goto Forum:
  


Current Time: Sat Jul 22 17:19:19 GMT 2017

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

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