Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

git reset asks 'more?'

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.

like image 874
norbertas.gaulia Avatar asked Jan 07 '13 21:01

norbertas.gaulia


2 Answers

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.

like image 181
Adam Dymitruk Avatar answered Oct 06 '22 13:10

Adam Dymitruk


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^" 
like image 35
me_and Avatar answered Oct 06 '22 14:10

me_and