$ git reset --soft HEAD^ (1) $ edit something here (2) $ add files to using git add $ git commit -c ORIG_HEAD (3)
1 – This is most often done when you remembered what you just committed is incomplete, or you misspelled your commit message, or both. Leaves working tree as it was before “reset”.
2 – Make corrections to working tree files.
3 – “reset” copies the old head to .git/ORIG_HEAD; redo the commit by starting with its log message. If you do not need to edit the message further, you can give -C option instead.
System Engineer (Texas Instruments France), Masters in Electronics , Embedded System Engineering,