Community
Participate
Working Groups
If the PushCommand is configured to delete a remote branch, it behaves different from the Git command line. Given there is a local branch 'foo' that tracks a remote brach with the same name, this code snippet: PushCommand pushCommand = ... pushCommand.setRemote( "origin" ); pushCommand.add( ":foo" ); pushCommand.call(); deletes the 'foo' branch on the remote repository *and* locally. Whereas 'git push origin :foo' from the command line leaves the local branch 'foo' intact.