Fixing warnings when checking git repo in detached stage

Before this change script is_git_synces output warnings:

    sh: 1: Syntax error: "(" unexpected

In case of:

    $ git branch
    * (detached from v1.3091)
1.0.1