public static boolean isBranch(final GitReference ref) {
        if (ref != null) {
            String name = ref.ref();
            return !TextUtils.isEmpty(name) && name.startsWith(PREFIX_HEADS);
        } else {
            return false;
        }
    }
Is reference a branch?

@param ref
@return true if branch, false otherwise
app/src/main/java/com/github/pockethub/android/core/ref/RefUtils.java