The idiom "Schwein haben" literally means “to have pig,” but figuratively, it means “to be lucky” or “to have good luck.” It's used when someone escapes a bad situation or gets an unexpectedly good outcome. For example, if someone narrowly avoids an accident or passes a tough exam without studying, you might say, “Du hast Schwein gehabt!”
Historically, pigs were symbols of prosperity and wealth in German-speaking cultures. Winning a pig in a medieval contest was a big deal, so the phrase eventually became synonymous with being fortunate.
This is one of the most positive and light-hearted German idioms , perfect for congratulating someone or commenting on a lucky situation. It's another example of how German idioms blend cultural history with everyday speech, enriching the language with depth and humor.