does git commit reset staging code example
Example 1: git soft reset head
git reset --soft HEAD^
//resets head by 1
Example 2: git reset hard directory
git restore --source=HEAD --staged --worktree -- aDirectory
# or, shorter
git restore -s@ -SW -- aDirectory