An emphatic form of oh my God.
A mild oath expressing surprise, disbelief or annoyance. It is stereotypically regarded as being uttered by pirates.