summaryrefslogtreecommitdiff
path: root/tech/git-reset-folder.txt
blob: ca5571d53bc81d52fbbd434d517787a9e936a7bf (plain)
1
2
3
4
5
6
7
8
9
git restore --source=HEAD --staged --worktree -- mydir

# or, shorter

git restore -s@ -SW -- mydir

That would replace both the index and working tree with HEAD content, like an reset --hard would, but for a specific path.

Works on git annex as well