diff options
Diffstat (limited to 'tech/git-reset-folder.txt')
-rw-r--r-- | tech/git-reset-folder.txt | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tech/git-reset-folder.txt b/tech/git-reset-folder.txt new file mode 100644 index 0000000..ca5571d --- /dev/null +++ b/tech/git-reset-folder.txt @@ -0,0 +1,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 |