I have a local Git repository and some branches appear to exist, for example:
master
test
branch1
branch2
branch3
However, when I try to checkout or delete branch2, Git says that there is no such branch. In addition, I can create a new branch with the same name (branch2).
As far as I understand, I somehow managed to put invisible symbols in the branch names. When I do git branch, I can see branch2 but in reality it's branch2x, where x is some invisible symbol. Copying names from the screen helped with some branches, but not with all.
So my question is: Is there any way to manage branches without knowing their exact names. By position, by Id or any other way?