-
Notifications
You must be signed in to change notification settings - Fork 840
Closed
Description
The title might be a misleading, but I can't seem to figure out how to do this git checkout -- ./blah ./foo with the exact behavior in git (i.e. discard unstaged files only). I'd expect it to look something like this:
// Open the repository.
repo, err := git.PlainOpen(path)
if err != nil {
return err
}
// Get the working directory tree.
w, err := repo.Worktree()
if err != nil {
return err
}
return w.Checkout(&git.CheckoutOptions{
Force: true,
Keep: true,
Files: []string{"./blah", "./foo"},
})I can't find anything in the issues or the codebase that even remotely hints at being able to do this.
Metadata
Metadata
Assignees
Labels
No labels