git_cli: handle cloning empty remote repos
When the remote repo has no branches (newly created empty repo), git
clone with --branch fails. This change detects that error and instead
initializes a local repo with the branch, adds the remote, and
configures receive.denyCurrentBranch=updateInstead so subtree pushes
work.