To uncommit your local commit (which has not yet been pushed to Github) and keep your staged changes use:
xxxxxxxxxx
git reset --soft HEAD~1
This command will undo your last commit, but it will keep your changes and your staging intact.
xxxxxxxxxx
# Revert changes to modified files.
git reset --hard
# Remove all untracked files and directories.
# '-f' is force, '-d' is remove directories.
git clean -fd
xxxxxxxxxx
//CHECK FOR UNCOMMITED CHANGES
git status -s
//If there are no changes has no output
//If there are changes are listed the modified files