Fix bug with errors in cloning empty repositories.
Traverse all remote heads to identify commits to be pushed.
Pre create remote ref directory.
Return default master sha, in case master branch does not exist.
comments.
Merge pull request #3151 from dart-lang/support_empty_git_repos

Support empty git repos