$(...)
and other forms of substitutions are not interpolated in single-quoted strings.
So if you want your date calculated, do
git commit -m "Database $(date '+%a %M:%H %h %d %Y')"
that is, the whole message string is double-quoted to allow $(...)
to be interpolated while the argument to date
is in single quotes to make it a single argument (passed to date
).