Why does no one mention you can simply
git commit -m 'message' -- my-dir
It seems to me the OP isn’t used to / doesn’t like to use the staging area directly. This approach is also a lot safer to recommend without further context, because chances are that a defaault commit (of everything that’s staged) will
- commit more than just my-dir if it already had been staged
- will produce confusing results when the OP is not used to managing the staging area explicitly (because the working tree can have gotten out of synch with the index)