CreateLocalBranchOperation createBranch = new CreateLocalBranchOperation(
repository, branchName, repository.getRef("master"),
UpstreamConfig.NONE);
createBranch.execute(null);
BranchOperation checkout = new BranchOperation(repository, branchName);
checkout.execute(null);
}
private Repository createRemoteRepository() throws IOException {
File gitDir = new File(getTestDirectory(), "pushbranchremote");
Repository repo = FileRepositoryBuilder.create(gitDir);