I am having a "weird" issue with Git on Windows and I am not sure if something has changed recently as for example a cache mechanism was added or kind off.
I have a branch locally: branch_A
and that branch was deleted from the remote. How do I know? Because ...
- I checked the Github PR and it was merged and the branch was deleted
- I ran the command
git branch -r | grep branch_A
and no results were returned
For some reason the command:
git checkout master && git pull origin master && git fetch -p
Is not telling me all the branches that were deleted from the remote. In other words it shows some of the branches that were deleted from remote but miss some others that were deleted as well.
That leads me to end up with dead branches and making it hard for me to know which branches should I keep updated and I have to go through all the PR checking if the branch was deleted or not so I cleanup my local repository.
Note: I am not expecting the command to delete any branch locally it makes no sense because git does not know if I need it or not (as @Chris says on it's answer)
The version I am running of Git is: git version 2.23.0.windows.1
.
Does any one have an idea of what could be wrong here? Am I missing something?