This is for a single line, not a command. I found the way to make it always prevent history for a single command.
EDIT: Sorry for the poor wording.
Single line - For example, if I type,
git push production, I might not want to accidentally execute this single line in the future, because it should only be run occasionally, and it has serious ramifications.
Command - In this example, the command is
git. I would want the history to remember
git push; git push staging
Single command - meant command as well.
Is this clearer now? Thanks.