The genetic fallacy creates an argument that is accepted or rejected based on the source of the evidence, rather than on the quality or applicability of the evidence. It is also a line of reasoning in which a perceived defect in the origin of a claim or thing is taken to be evidence that discredits the claim or thing itself.
Essentially, the genetic fallacy is the broad grouping for several other fallacies including argumentum ad hominem and argument from authority, which attempts to misdirect the line of reasoning by invoking the origins of a claim, rather than the quality of evidence.
There are some cases where this fallacy may not be a fallacy–for example, when the source of the claim may be disputed or accepted if it is relevant to the quality of the evidence.
Hitler ate sugar, so sugar must be evil.