Unable to delete remote branch [message #1736241] |
Mon, 27 June 2016 19:17 |
Eric Walker 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?
|
|
|
Powered by
FUDForum. Page generated in 0.03076 seconds