What is the effect of garlic on intestinal flora?
From studies, 


  lactic acid bacteria were found to be more resistant to GP (garlic
  powder) compared to the clostridial members of the gut microbiota.
  While for most bacteria the antimicrobial effect was transient, the
  lactobacilli showed a degree of resistance to garlic, indicating that
  its consumption may favour the growth of these beneficial bacterial
  species in the gut. Once the strains of other bacteria (eg:
  Bacteroides ovatus, Bifidobacterium longum DSMZ 20090 and Clostridium
  nexile A2-232) became resistant, they retained their resistant
  phenotype upon sub-culturing. Garlic intake has the potential to
  temporarily modulate the gut microbiota (reference).


Overall garlic can prove to be beneficial, because it seems to have more of an effect on detrimental bacteria like Helicobacter pylori (H. pylori), even when its strains were resistant to antibiotics. Overall garlic was found to be more detrimental to pathological bacteria when compared to normal gut flora (reference). Garlic’s diallyl disulfide has also been found to effectively cause cell death in Candida albicans which is a fungus in our gut which if not kept in check can cause health problems (reference). 

Inulin and fructooligosaccharides present in garlic can also serve as nutrients for the probiotics colonizing your body (reference).