Skip to content

delete remote branch  #74

Open
Open
@accfcx

Description

@accfcx

How to delete remote branch with JGit? I search over Google and text following code.

   git.branchDelete()
            .setBranchNames(fullBranch)
            .call();

    RefSpec refSpec = new RefSpec()
            .setSource(null)
            .setDestination(fullBranch);

    git.push()
            .setRefSpecs(refSpec)
            .setRemote("origin")
            .call();

but it does not work at all. It just deletes local branch.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions