I wanted to discard all changes I accidently did on the vendor folders of my go programme.
My file structure looks like this:
go/src
├───unauth_plugin
│ ├───vendor
│ └───.go files
├───auth_plugin
│ ├───vendor
│ └───.go files
├───logging_plugin
│ ├───vendor
│ └───.go files
Doing this from src
discards all changes done within the three vendor folders:
1 | git restore ./*/vendor |
Note that this is also available:
1 | ./**/vendor |
where ** means all folders RECURSIVELY from this point in the path.