Add more error conditions for git branch command.