Fixed GitService tracking ref branch checking logic