I also set create-lockfiles to nil. I think you can theoretically keep the lockfiles and the clean directory by using lock-file-name-transforms to place the lockfiles somewhere sensible but I didn't bother.

Without this I had to be careful not to acciddentally commit stuff like ".#filename.txt".