I have a dirty working tree, dirty because I made changes to source files and touched up some images. I was trying to add just the images to the index, so I ran this command
In doubt, try:
git -A -- *.png
, which might be more comprehensive (git add man page)
-A
--all
Like
-u, but matchagainst files in the working tree in addition to the index.
That means that it will find new files as well as staging modified content and removing files that are no longer in the working tree.
See SO question "Difference of “git add -A” and “git add .”"