The Nephilim episode in Genesis likely had nothing to do with the Flood originally. There is some textual evidence that the Flood story was added later to J's primeval narrative, and other Pentateuchal allusions show the Nephilim and Rephaim to be alive and well in the days of Moses. One mention of them in Baruch suggests that they died out not because of the Flood, but through the Israelite's conquest of Canaan. We thus encounter such Rephaim giants as Og, king of Bashan, and Rephaim giants also turn up in the days of David, such as Saph, Goliath, and others (cf. 2 Samuel 21). I seriously doubt that the pre-Israelite inhabitants (e.g. the Rephaim, Nephilim, Emim, Zamzummim, Zuzim, Anakim, and other -im peoples) of Canaan were actually giants, and archaeological excavations of Levantine sites has surely not substantiated the rather late Israelite and Jewish belief that the former inhabitants of the land before them were giants (or included giant peoples). What we are really dealing with is folklore and mythology. Consider that "Rephaim" is also the word for the ghosts of dead ancestor kings in Sheol, and the Phoenicians and Canaanites believed that the most ancient Rephaim in the underworld were once the famed kings and heroes of old. Consider also that the Rephaim king Og, king of Bashan and specifically the cities of Ashtaroth and Edrei, is exactly analoguous to the Canaanite god Rapiu/Rapha (the god of the underworld and leader of the Rephaim) whose holy cities were the very same Ashtaroth and Edrei in Bashan (the modern town of Rafeh in Syria still bears his name!). And consider too that the analoguous god Molech, also believed to be the leader of the dead in the underworld, was worshipped by the southern Judahites in valleys near Jerusalem traditionally associated with the underworld -- Hinnom (Gehenna) and the Valley of the Rephaim. Thus, the Israelite belief in the Rephaim and the Nephilim draw on older mythological motifs that derive from the Canaanites that came before them. The original idea is likely preserved in such works as Philo of Byblos' Phoenician History, which describe the gods as coming to earth to intermarry with mortals and to teach them the secrets of civilization. This tallies with the Sumerian myths of the akpallu, and also with later Jewish legends as 1 Enoch. The Hebrews historicized the Nephilim and Rephaim as the inhabitants of the land that preceded them. The earlier Canaanites historicized the Rephaim as the Didanite ancestors of the Amorite kings. And though no documentary material survives, it is quite likely that the Amorites and Didanites historicized the Rephaim (or more specifically, the ancestor spirits associated with the god Malik = later Molech) as a still earlier dimly-remembered people. It seems that as history fades away into legend, what is dimly recalled merges with traditional mythic motifs of the fantastic founders of civilization.
Here is my thread that goes into this in detail:
http://www.jehovahs-witness.com/10/68224/1.ashx