[AC-4972] conditionalize remote branch setting on it being a branch.
[AC-4972] conditionalize remote branch setting on it being a branch.

masschallenge/impact-api,masschallenge/impact-api,masschallenge/impact-api,masschallenge/impact-api