4 ms·
Yes there is. When you have a new repository without any commits, there is no HEAD, so you can't unstage by resetting. mkdir try cd try git init
by tspiteri 15y ago
Yes there is. When you have a new repository without any commits, there is no HEAD, so you can't unstage by resetting.
mkdir try
cd try
git init
touch file
git add file
git status
Still, the git status command shows you what you need to do to unstage.