if I run:
git branch -r | wc -l
in a local git sandbox that I created via a `git clone`, I will get approx 433 branches.
This is about (possibly exactly, but I didn't count them) what Bitbucket shows me if I go the branches page (and keep scrolling down).
So far so good, as I believe that is how many branches we currently have.
Now, if I go onto our Bamboo linux agent, and go into a directory that was created by one of my build plans, and run that same command, I get 1,862 branches.
Running, `git fetch --prune` seems to have no effect.
I've seen some articles that mention if the git sandbox was created with a `git fetch` (rather than a `git clone`) then `git fetch --prune` may not have any effect, but I need to have that command have an effect.
My Bamboo build plan gets the list of remote branches and operates on it, by creating a report full of information about "current" existing branches, along with some JIRA information.
Currently this report has 1429 plus branches that are not "current" and have since been deleted.
Thus my report has mostly wrong OBSOLETED information.
So the question is, what does Stash/Bitbucket do during the "checkout source code" step that prevents my running `git fetch --prune` effectively, and why would my newly created git sandbox on the Bamboo agent have old and outdated branch names?
Baffled.
I need some work-a-rounds to this issue.
Thank you.