Trying to checkout remote branches for repository:
Command: git.checkout().setCreateBranch(true).setName(<branchName>).setUpstreamMode(CreateBranchCommand.SetupUpstreamMode.TRACK).call()
However, it is setting the new branch HEAD at changes from master
branch in local.
The git command I need to recreate
git checkout -b <branchName>
- Where head of new branch should be same as head of remote