Community
Participate
Working Groups
I need to be able to create and checkout a local branch for a remote tracking branch. After discussion with Tomasz, we could enhance our Branch API by adding two parameters to request body of POST /git/branch/... i.e. - Checkout (false/true) indicating that newly created branch should be checked out immediately - SrcRefSpec? to specify for what ref the new branch is created
(In reply to comment #0) > - Checkout (false/true) indicating that newly created branch should be checked > out immediately which would be an equivalent of "git checkout -b {branch}" or "git checkout --track -b {local} {remote}/{branch}" for remote branches > - SrcRefSpec? to specify for what ref the new branch is created which would be an equivalent of "git branch {branch} {commit}".
For now I need "git checkout -t {remote}/{branch}"
I added git branch --track <branchname> [<start-point>]. The client will call it first and then git checkout on <branchname>. I'm opening a separate bug for test updates.
Fixed with 7708d714757dc89aa41acd85524757dc25fe2eb6. I'm also changing the summary to better reflect the reality.