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