Replies: 1 comment
-
|
Did you find a way to accomplish this? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I want to create a worktree for an existing directory - but I don't want to add a branch in it. As far as I understand, in git CLI I can do this with
git worktree add --detach PATH. Is there a way to do that in libgit2, or am I misunderstanding how that CLI feature works?I understand to create a worktree in libgit2 I need to use git_worktree_add(). However, by default it seems to create a new branch based on the passed
nameargument. Is it possible to call it in some way that would not create a new branch, and just use HEAD or any passed reference in a detached mode?Beta Was this translation helpful? Give feedback.
All reactions