I have tons of modified files, and a good 2/3s of the files are images that I don't care much about, but I still want to commit them. For the rest I need to really look hard at the changes. To minimize the files I need to look at I want to only stage .png and .jpg and .gif files and commit them (cutting down the background noise in order to look at the beef).
Having said that...
How would you stage and commit only files with these file endings without adding each file separately?
Edit:
Files are modified
Directory structure is not flat
I am overwriting a WP Theme that I have highly customized and there is a security update I need to apply
Simply
git add \*.jpg \*.png
This will add all tracked and modified files in your repository which match the wildcard pattern
If your image files are the only things under a specific directory
git add <directory>
will add everything under that directory
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With