Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LibGit2Sharp.Command.Checkout doesn't setup tracking to remote branch #1564

Closed
splatteredbits opened this issue Apr 12, 2018 · 1 comment · Fixed by #1820
Closed

LibGit2Sharp.Command.Checkout doesn't setup tracking to remote branch #1564

splatteredbits opened this issue Apr 12, 2018 · 1 comment · Fixed by #1820

Comments

@splatteredbits
Copy link
Contributor

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?

@louis-z
Copy link
Contributor

louis-z commented Jul 19, 2020

Though I'm not too familiar yet with the code base, I've begun looking into this. Is anyone else working on it? If not, I'll gladly keep on investigating.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants