Git windows command line, version 1.8.0
I have 3 commits so far and when I type
git reset --soft HEAD^
new line comes up with
More?
and flashing cursor for input
Then, whatever I type, I always get
fatal: ambiguous argument 'HEAD ': unknown revision or path not in the working tree. Use '--' to separate paths from revisions, like this: 'git [...] -- [...]
All other commands works fine in the same folder.
see if git log HEAD^
works. If it doesn't, it may be something with your localization or terminal. It seems to be filtering out the ^
symbol. As a workaround, use git reset --soft HEAD~1
for now.
Your shell is interpreting the ^
symbol as a line continuation symbol. Either just avoid using ^
as Adam suggests:
git reset --soft HEAD~1
or quote the argument so the shell doesn't attempt to interpret it (I'm not sure exactly which shell you're using, but I'd be surprised if this doesn't work):
git reset --soft "HEAD^"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With