GitRemoteBranch (String to) { int firstSlash = to.indexOf('/'); GitRemote remote = new GitRemote(to.substring(0, firstSlash), Collections.emptyList(), Collections.emptyList(), Collections.emptyList(), Collections.emptyList()); return new GitStandardRemoteBranch(remote, to.substring(firstSlash + 1)); }