From: Spencer Date: Wed, 18 Jun 2025 04:27:16 +0000 (+0000) Subject: Added a comment: Easy Approach X-Git-Tag: archive/raspbian/10.20251029-1+rpi1~1^2~7^2~77 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=36f393fc9fec3983f22c431a622e44627f9f74d5;p=git-annex.git Added a comment: Easy Approach --- diff --git a/doc/bugs/git_worktree_remove_fails/comment_3_fffd495306d1eb4093f1235c337326cd._comment b/doc/bugs/git_worktree_remove_fails/comment_3_fffd495306d1eb4093f1235c337326cd._comment new file mode 100644 index 0000000000..c012bbf112 --- /dev/null +++ b/doc/bugs/git_worktree_remove_fails/comment_3_fffd495306d1eb4093f1235c337326cd._comment @@ -0,0 +1,18 @@ +[[!comment format=mdwn + username="Spencer" + avatar="http://cdn.libravatar.org/avatar/2e0829f36a68480155e09d0883794a55" + subject="Easy Approach" + date="2025-06-18T04:27:16Z" + content=""" +Here's how to remove a worktree: + +```bash +echo \"gitdir: $(readlink .git)\" > .git0; +rm .git; +mv .git0 .git; +git worktree remove .; +``` + +as done inside the worktree itself. Update paths if you want to remove the worktree from outside of it. +So long as you don't run another `git annex` command after replacing the symlink with a file, `worktree remove` should work! +"""]]