The no-op path worked (the else branch runs and exits 0), but using `git fetch`
as the existence check printed `fatal: couldn't find remote ref ...` to stderr
when the branch is absent -- which reads as a failure even though the step
succeeds. Probe with `git ls-remote --exit-code --heads` instead, which is
silent and sets a clean exit code; only fetch/checkout when the branch exists.