I ended up creating several git clones of various repositories over time, and in some of the clones, I created more than one branch. I want to now find the clone which has a specific branch.
I looked through StackOverflow questions and came across the following post Git Status Across Multiple Repositories on a Mac. Using this as reference, I decided to write my own shell script to do list all clones and the branches in each clone. However, by greping in the .git directory, I could not find any place where this information is available. The HEAD file only has information about the currently checked out branch.
I can certainly write a script to process the output of git branch in each clone's working directory. However, before I start on that, I would like to know if there is an easier way of obtaining this information.