It was as if the Giants had been here before. Which they had. The Giants do not always make the playoffs, but when they do, celebrations ensue, and now they are trying to win their third World Series in five years.

If this qualifies as a dynasty, it was hard to see coming. The Giants did not clinch a playoff berth until the final day of the regular season in 2010; they had the worst record of the three National League division winners in 2012; and nobody in this year’s playoff field had a worse record than the Giants’ 88-74, though the Oakland Athletics and the Pittsburgh Pirates matched it. The Giants lost the season series to two of the three teams they have eliminated — the Pirates and the Washington Nationals — and they were swept by the Kansas City Royals, their next opponents, in August.

The Giants are as much at a loss to explain their October transformation as anyone else.

“It’s the even year,” catcher Buster Posey said. “I think that’s what it is.”

Jeremy Affeldt, who escaped a bases-loaded jam against the Cardinals in the top of the ninth Thursday, had been leaning toward a more personal superstition: His wife had children in 2010 and 2012.