'How can I rename a git worktree

Given I have run

$ git worktree add ~/worktrees/a
$ cd ~/worktrees/a
$ git status
On branch a

I would like to instead change the name of the worktree and branch from a to b.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source