reset hard in git using command code example
Example 1: git reset head
sudo git reset --hard Head
Example 2: git reset hard directory
git restore --source=HEAD --staged --worktree -- aDirectory
# or, shorter
git restore -s@ -SW -- aDirectory
sudo git reset --hard Head
git restore --source=HEAD --staged --worktree -- aDirectory
# or, shorter
git restore -s@ -SW -- aDirectory