You can’t create two local branches or two distant branches with the same name.
-
Here you have a local branch named
remotes/origin/abc
and a distant branch namedabc
on the remoteorigin
. They have not the same name, but it seems to when you use thegit branch --all
command. -
To identify which branch is which, you can show local branches with
git branch
, or show remote branches withgit branch --remote
. You could also easily differentiate them even while usinggit branch --all
with the branch syntax coloration (git config --global color.branch auto
). -
To remove the accidentally created local branch
abc
, you have to dogit branch -d abc
(orgit branch -D abc
to force deletion, seeman git-branch
).