There is a school of thought that you should never swear to God, as it is the equivalent of swearing an oath and/or promise to God, and you can't know that you can keep said oath/promise.
You don't want to break an oath/promise to God, I'd assume.