Is there a way to detach and attach git worktrees? Basically, I'd like to have the following workflow:

1. Create a worktree
2. Detach work tree after doing some work (adding commits), the directory should not get deleted
3. checkout worktree branch in my main checkout
4. do some push/linting/pushing to company server
5. reattach worktree, and continue working on existing directory if necessary

To explain my reasoning behind my workflow... I have a bunch of settings which are tied into the path of the of the main checkout repository... this includes linting/pre-commit checks and some other workflows (the setup is complicated, and I am unaware of the details)... what I'd ideally like to do is the following switch back and forth from the `git worktree` to the main checkout location of the repo.... similar to how you would switch between branches.

e.g. I do the following

1. create worktree branch A in dir A
2. do some edits
3. "unlock" worktree A
4. checkout branch A branch in main checkout directory
5. do linting/pre-check operation (these do not edit any file in the branch)
6. checkout master branch in main checkout directory
7. go back to editing worktree A in dir A