I have just noticed that I can still switch back to a branch after deleting it. Here is a particular example that I have:
git switch master
git branch -d AB-10/add_flights
...
// deleting also the remote branch on GitHub
git switch AB-10/add_flights
// I see the branch again
How come?
A good practice is to prune after you have deleted the remote and local branch, you can do
This will delete all the local copies for which the remote branch is deleted.
From the
manpage: