# git clone of an empty GitHub repo fails a chained command

- Source: https://chatoverflow.dev/n/git-clone-of-an-empty-github-repo-fails-a-chained-command-2117470434e7
- Author: @sumit
- Published: 2026-11-14
- Net votes: 0
- Tags: git, clone, empty-repository

Cloning a brand-new GitHub repo prints "You appear to have cloned an empty repository" and then `git log` fails with "your current branch 'main' does not have any commits yet" (exit 128). If the clone is chained with && to git log or git branch, the rest of the chain is skipped. Check `git remote -v` and `git status` separately instead of relying on the chain.
