How do I avoid attaching the wrong same name family to my tree?

Slow down at exactly the point where a match feels welcome. Work backwards one generation at a time, from a record that is certainly the family's, and require each new record to agree with the ones already held on place and on people, not on the name alone. Collect every household of the surname in the parish, from the censuses and Griffith's Valuation, and account for each one, so that a wrong candidate is ruled out rather than ignored. Use the company a family kept: baptism sponsors, marriage witnesses and neighbours repeat across records and separate one household from another. Naming patterns and occupations help, but only as supporting clues. Keep notes on the families rejected and why, so the same mistake is not made twice.

Useful pages: The Irish surnames map · Trace your Irish roots · The 1926 Census guide · Coming home · Irish around the world · Plan your journey

Sources

More in Surnames and your Irish roots

All questions in Surnames and your Irish roots