hi Team
In Lab : resetting and reverting Q5 there is a hint provided " git reset --soft HEAD-1 "
I tried this but this gives error as below
sarah (master)$
sarah (master)$ git reset --soft HEAD-1
fatal: ambiguous argument 'HEAD-1': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
sarah (master)$
sarah (master)$ git status
On branch master
nothing to commit, working directory clean
sarah (master)$
sarah (master)$ git log --oneline
b452a7d (HEAD -> master) Finish story
26158b4 Revert "Add author info to stories"
f61f233 Add author info to stories
ce3d08a Add stories
sarah (master)$ git reset --soft HEAD~1
sarah (master)$
I think the answer provided in hint should be " git reset --soft HEAD~1 " and not HEAD-1
But please verify and revert.
with best regards
Pradeep Nehe
==============================
Complete output as below
sarah (master)$
sarah (master)$ git reset --soft HEAD-1
fatal: ambiguous argument 'HEAD-1': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
sarah (master)$
sarah (master)$ git status
On branch master
nothing to commit, working directory clean
sarah (master)$
sarah (master)$ git log --oneline
b452a7d (HEAD -> master) Finish story
26158b4 Revert "Add author info to stories"
f61f233 Add author info to stories
ce3d08a Add stories
sarah (master)$ git reset --soft HEAD~1
sarah (master)$