In my test github repo, all my remote branches are shown in the .git\refs\remotes\origin\ folder. Like this:

But I just checked another non-toy repo, all the remote branches cannot be seen in that folder. Like this:

But the git remote show origin does show a lot of remote branches. And I still can create new local branch to track those remote branches.
Why?
Git has a feature where it will pack the seperate ref files into a single file to improve performance and lower the storage cost. When a ref is packed, it will no longer exist as a seperate file in the refs folder.
When a ref is missing from the traditional $GIT_DIR/refs directory hierarchy, it is looked up in this file and used if found.
You can pack the ref files using the git pack-refs command.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With