Define aliases in hgrc for the commit command, which excludes the file that you do not want to track in commit.
[alias]
xcommit=commit --exclude path/to/file
xstatus=status --exclude path/to/file
hgrc , , ; , hg status, hg commit.
, .hgignore , , .