Title: Git worktree not supported by Repository object · Issue #1225 · libgit2/libgit2sharp · GitHub
Open Graph Title: Git worktree not supported by Repository object · Issue #1225 · libgit2/libgit2sharp
X Title: Git worktree not supported by Repository object · Issue #1225 · libgit2/libgit2sharp
Description: It seems like "git worktree" introduced in Git 2.5 is not supported by the library. If I try to create a Repository object with my worktree directory, or with the file path directly to the ".git" file, it says it's not a valid Git reposi...
Open Graph Description: It seems like "git worktree" introduced in Git 2.5 is not supported by the library. If I try to create a Repository object with my worktree directory, or with the file path directly to the ".git" f...
X Description: It seems like "git worktree" introduced in Git 2.5 is not supported by the library. If I try to create a Repository object with my worktree directory, or with the file path directly to th...
Opengraph URL: https://github.com/libgit2/libgit2sharp/issues/1225
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Git worktree not supported by Repository object","articleBody":"It seems like \"git worktree\" introduced in Git 2.5 is not supported by the library. If I try to create a Repository object with my worktree directory, or with the file path directly to the \".git\" file, it says it's not a valid Git repository.\n\nFor example, I have C:\\Code\\Main and I use \"git worktree\" to create a worktree at C:\\Code\\Fix. I am not able to create a Repository object if I pass in either \"C:\\Code\\Fix\" or \"C:\\Code\\Fix.git\". It also doesn't work if I pull the gitdir out of the .git file (C:\\Code\\Main\\worktrees\\Fix) and pass that into the Repository constructor. (Git Extensions correctly handles the worktree so I don't believe there's any other issue at play.)\n\nApologies if this is covered somewhere else or if I'm just doing something wrong, Google search wasn't very helpful and the term worktree didn't bring up anything here in Issues.\n\nI tried working around by setting IndexPath and WorkingDirectoryPath in RepositoryOptions, but it still uses the current HEAD of the original repo at C:\\Code\\Main instead of the one in C:\\Code\\Fix.\n\nMore details on git worktree:\nhttps://git-scm.com/docs/git-worktree\nhttps://github.com/blog/2042-git-2-5-including-multiple-worktrees-and-triangular-workflows\n","author":{"url":"https://github.com/jjcole","@type":"Person","name":"jjcole"},"datePublished":"2015-11-02T21:07:35.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":4},"url":"https://github.com/1225/libgit2sharp/issues/1225"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:818b5f4b-0b23-10a9-ab99-91cde489c1f5 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9DDA:3EE21F:9B6A123:D200801:6A5E998F |
| html-safe-nonce | 72e20a14d44ed0b7c04c2a82bccfca1d3079ebf46fe59c860f4a12613c49e136 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5RERBOjNFRTIxRjo5QjZBMTIzOkQyMDA4MDE6NkE1RTk5OEYiLCJ2aXNpdG9yX2lkIjoiNTg5MzAzMTQwMjA2NjA1NzYxNSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | a789e954d77e699cd6f0cdf78fdd9de2a5a85b80cf20ecdadcca3128fca8ce41 |
| hovercard-subject-tag | issue:114683989 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/libgit2/libgit2sharp/1225/issue_layout |
| twitter:image | https://opengraph.githubassets.com/2a87a89fff1acbcf1f4dc7a68e78e6cefd00be7d3e08b484cedd506a2c7bb092/libgit2/libgit2sharp/issues/1225 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/2a87a89fff1acbcf1f4dc7a68e78e6cefd00be7d3e08b484cedd506a2c7bb092/libgit2/libgit2sharp/issues/1225 |
| og:image:alt | It seems like "git worktree" introduced in Git 2.5 is not supported by the library. If I try to create a Repository object with my worktree directory, or with the file path directly to the ".git" f... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | jjcole |
| hostname | github.com |
| expected-hostname | github.com |
| None | 7c7e31acb6a895494e518b880f5ccf39604f7fa9a8f2f3c64145efc3b776256d |
| turbo-cache-control | no-preview |
| go-import | github.com/libgit2/libgit2sharp git https://github.com/libgit2/libgit2sharp.git |
| octolytics-dimension-user_id | 394745 |
| octolytics-dimension-user_login | libgit2 |
| octolytics-dimension-repository_id | 1415168 |
| octolytics-dimension-repository_nwo | libgit2/libgit2sharp |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1415168 |
| octolytics-dimension-repository_network_root_nwo | libgit2/libgit2sharp |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 2d2ac9bdd71d5f53f2b731c9330677e38624e301 |
| ui-target | canary-2 |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width