how to uncommit changes git code example
Example 1: git revert uncommitted changes
# Revert changes to modified files.
git reset --hard
# Remove all untracked files and directories.
# '-f' is force, '-d' is remove directories.
git clean -fd
Example 2: how to uncommit in git
git reset --soft HEAD^