using git i want to get all the commits affecting files that are present on a folder or…
- User
using git i want to get all the commits affecting files that are present on a folder or its child folders using glob patterns
- Assistant
To get all the commits affecting files in a specific folder or its subfolders using glob patterns in Git, you can use the
git logcommand with a pathspec. Pathspecs allow you to specify patterns to match files in the repository. However, Git does not support full glob syntax directly within a pathspec; it uses its own simplified wildcard matching, where*matches multiple characters within a single directory level.Here’s how you can achieve this: