-
-
Notifications
You must be signed in to change notification settings - Fork 507
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
delete remote branch #74
Comments
I fear the Git protocol does not allow this, you may need to delete the branch locally and then push that deletion to the remote repository. However I am not sure about how to do this actually, sorry. Please also note the statement in the README and in new-issue screen, duplicated below again. Therefore I am closing this, please ask on stackoverflow to get more people to take a look and comment. Note: Please use sites such as http://stackoverflow.com for general questions about JGit usage, not issues in this project. Issues should be used for problems with snippets and suggestions of missing snippets. Snippets from good answers on stackoverflow can then be included here, naturally. |
The idea of snippet presented in this issue works well. I got the same from: https://stackoverflow.com/questions/11892766/how-to-remove-remote-branch-with-jgit I guess #74 (comment) the value of If the branch is named jgit-cookbook/src/main/java/org/dstadler/jgit/porcelain/CreateAndDeleteBranch.java Lines 52 to 55 in 288825e
Then this will delete the local pointer we have of the branch in the distant repository:
and this will delete the branch remotely in the distant repository:
In my opinion a snippet of this cook book could contain and example for this last use-case. |
How to delete remote branch with JGit? I search over Google and text following code.
but it does not work at all. It just deletes local branch.
The text was updated successfully, but these errors were encountered: