Closed
Description
I expect the LibGit2Sharp.Commands.Checkout
function to checkout and setup a local tracking branch for remote branch names.
Here's my PowerShell code:
$checkoutOptions = New-Object -TypeName 'LibGit2Sharp.CheckoutOptions'
[LibGit2Sharp.Commands]::Checkout($repo, 'develop', $checkoutOptions)
This fails with a NotFoundException
:
NotFoundException: No valid git object identified by 'develop' exists in the repository.
I would expected checkout to behave like the git checkout
command and create a local branch to track the remote branch.
If/until this functionality arrives, can we document how to setup a local tracking branch?