Open
Description
Describe the bug
Title
To Reproduce
Steps to reproduce the behavior:
- Run
git branch -d old_branch
orgit branch -D old_branch
from git root or from the worktree directory. - This doesn't seem to delete the branch and worktree from the git cache, doing
git checkout old_branch
re-creates the worktree directory with the files of the 'deleted' branch.
Expected behavior
git checkout old_branch
should raise an error after such branch has been deleted.
Screenshots
N/A
Desktop (please complete the following information):
- OS: Linux Mint 20, but tested on Windows 10 and Windows 11, too.
- Git version: 2.25.1
- Shell: Bash 5.0.16
- Repository version: v1.1.0
Additional context
git branch -d/-D old_branch
does indeed delete the worktree directory, but it's kept in the cache.
Metadata
Metadata
Assignees
Projects
Status
To do