Answers for "git reset -- hard and git reset -- soft"

6

git soft reset head

git reset --soft HEAD^
//resets head by 1
Posted by: Guest on August-13-2020
0

git reset hard directory

git restore --source=HEAD --staged --worktree -- aDirectory
# or, shorter
git restore [email protected] -SW  -- aDirectory
Posted by: Guest on December-28-2020

Browse Popular Code Answers by Language