GIT stage and commit only files with specific file endings
I have tons of modified files and a good 2/3 of the files are images that I don't care about but still want to capture. For the rest, I need to monitor the changes very closely. To keep the files to a minimum, I need to look that I only want to create .png and .jpg and .gif files and capture them (cut out the background noise to look at the beef).
Having said that ...
How would you shoot and capture only files with these file endings without adding each file separately?
Edit:
Files changed
Directory structure is not flat
I am overwriting a WP theme which I configured very well and there is a security update I need to apply
source to share
Ermmm ..., in case of flat directory structure
git add *.jpg *.gif *.png
Or, in a nested directory structure, the trick is to stop the shell from expanding the symbol *
and let git do it. Because git is recursive for subdirectories too.
git add \*.jpg \*.gif \*.png
Or am I missing something?
source to share