What is the correct spelling, *dammit* or *damnit*? And what is the difference?

Just writing this question brings up a red squiggly underneath *damnit* and the suggestions include *dammit* and *damn it*.