In a git repository I have a subdirectory that I want to reset to a specific state in the past (an earlier commit). Is it possible to undo all commits on files in a specific
The simplest way to do it to use the ability of git checkout to be applied on a subdirectory. Then stage and commit:
git checkout
git checkout -- path/to/subdir git add -A path/to/subdir git commit -m "reverted files in path/to/subdir to what it was at "