Definition: used as a mild oath or to express surprise
In many cultures, using the name of a deity is considered to fall somewhere between improper and scandalous. This would appear to be the case for many of the English-speaking people, judged by the large number of euphemistic terms we have for God, and for god-related things. Many of these are simple and short substitutions for the word God itself, such as gosh or golly. Then we have some slightly more colorful terms, such as doggone and dodgasted, which stand in for "God damn" and “God blasted," respectively.
But this is really just the tip of the iceberg, for our tongue has many, many more such words, some of which are quite creative ways of not saying something. We have gadzooks (sometimes written as odszooks, which is a euphemism for god attached to zooks; the latter word may or may not represent hooks, since "god’s hooks" would signify the nails used for the crucifixion of Jesus. We also have odsbud ("God’s blood"), zounds ("God’s wounds"), and struth (which stands for "God’s truth").
Moving somewhat further afield, our language has a variety of ways of saying "God’s body": gadsbodikins, odsbodikins, and ods-bobs. If you want to make mention of something belonging to God, but don’t want to mention his name or his body you may use odds fish, which may refer, depending on who you ask, to either the fish or to the flesh of God. If all these euphemisms are a bit too much you can always fall back on that old standby, gorblimey ("God blind me").
Wal, sir, I’m blest ef they didn’t come right out from mass an’ steer straight for that liquor shop. Gosh! Why, I counted 26 go up to the bar an’ drink in twenty minutes.
Henry Morgan, Boston Inside Out! Sins of a Great City!, 1883