I commit to a git repository for the first time; I then regret the commit and want to revert it. I try
# git reset --hard HEAD~1
I get this message:
fatal: ambiguous argument 'HEAD~1': unknown revision or path not in the working tree.
This commit is the first commit of the repository. Any idea how to undo git's initial commit?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…