I am using git, and generally want the git info, but there are a few posts that I need to back date. Is it correct to say then that it is impossible to backdate posts and use gitinfo?
This behavior is not consistent. If you’re not using git, you can use the lastmod param to override the file metadata. If you are using git you cannot. It would be more consistent to either allow an override or not, regardless of where the primary data is stored.
Practically, this results in template developers having to make special concessions as you say, to create a nonstandard front matter attribute for what should be pretty straightforward to handle.
You came with a problem, I offered a working solution.
Now, keep in mind, I’m still learning Hugo. So others may (will likely) have better explanations for why things are the way they are. I could also be missing something here.
Use lastMod (front matter), but fall back to Git if not set
Use Git (if enabled), but fall back to lastMod
Many variations of the above, including using system file timestamp
What we don’t support is, say, use lastMod for some files, but use Git for the others. That would, in my head, be very inconsistent … But there may be something I don’t see, so please explain.
I was expecting .Lastmod to use the author defined lastmod property if present, then fall back to either git or stat.st_mtim inference.
This would be the same behavior as several other hugo features. For instance: slug, which uses the front matter override if present, but falls back to an inference of the file basename.