Move (or “Undo”) last git commit to unstaged area [duplicate]

You can use git reset to set the current branch to the preceding commit, i.e. HEAD^

git reset HEAD^

Adding --soft will keep those files in the index: (ready to be committed)

git reset --soft HEAD^

--soft

(…) This leaves all your changed files “Changes to be committed”, as git status would put it.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)