Closed
Description
After initializing git repository, but before committing, I can select "Undo Last Commit" from the "..." menu. That fails, of course. The resulting git reset HEAD~ won't work if there are no commits.
Undo Last Commit should be grayed out if HEAD doesn't have a parent.
Here's the log:
git init
git fetch
fatal: No remote repository specified. Please, specify either a URL or a
remote name from which new revisions should be fetched.
git reset HEAD~
fatal: ambiguous argument 'HEAD~': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
git fetch
fatal: No remote repository specified. Please, specify either a URL or a
remote name from which new revisions should be fetched.
git fetch
fatal: No remote repository specified. Please, specify either a URL or a
remote name from which new revisions should be fetched.
git fetch
fatal: No remote repository specified. Please, specify either a URL or a
remote name from which new revisions should be fetched.