git reset --soft HEAD~1 // to soft reset (preserve changes)
git reset HEAD /files/you/wish/to/unstage
You can now commit the staged files and checkout the unstaged files
git commit
git checkout /files/you/wish/to/checkout
That's it!
git reset --soft HEAD~1 // to soft reset (preserve changes)
git reset HEAD /files/you/wish/to/unstage
git commit
git checkout /files/you/wish/to/checkout
C-x ( to start recording
C-x ) to stop recording
C-x e to execute
C-u N C-x e