IDEX-1579 Fixed branches deletion

even if branch name will called smth like "refs/remotes/bla-bla" this block of code will be skipped anyway