I am working on OSX Yosemite. I seem to have a branch called Icon, which I certainly haven't created deliberately:
$ git branch
Icon
* master
But if I try to delete it does not find the branch:
$ git branch -D Icon
error: branch 'Icon' not found.
Similarly, I can't check it out:
$ git checkout Icon
error: pathspec 'Icon' did not match any file(s) known to git.
What on earth is going on?
It's not a branch. The Icon? files are auto created by Google Drive sync client for OS X, and are a pain especially when you are using Git. When you created the repo (or cloned it), OS X automatically put an Icon? file in every single directory, including your .git/branches directory:
$ ls .git/branches/
Icon?
See these related threads for more info: How to ignore Icon? in git https://productforums.google.com/forum/#!topic/drive/6SIZ7nhNO4w
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