Introduction
When you change files in a project, you need to tell Git which files to save for the next snapshot. Using patterns and directories with git add helps you quickly select many files without naming each one.
When you want to add all files in a folder to your next commit.
When you want to add only files with a certain extension, like all .txt files.
When you want to add files that match a pattern, like all files starting with 'test'.
When you want to add changes in multiple folders at once.
When you want to avoid adding unwanted files by specifying exactly which files to include.