Hair tests for alcohol consumption actually test for ethyl glucuronide, a metabolite of ethyl alcohol. It is always present in hair when alcohol has been used, and is never present otherwise, hence it is a positive test for consumption of alcohol.
The length of time it can be read in the hair is, theoretically, at least, dependent on the length of the hair. Hair grows at roughly 1/2 inch per month, so hair 12 inches long could be tested back for two years. It is probable that damage to the hair from chemicals such as bleaches and dyeing agents could affect the accuracy of the testing in longer hair, but in shorter hair the test is accurate to acceptable levels for legal use.
ETG testing is normally used to (a) determine if alcohol has been used recently; or (b) establish a pattern of continuous alcohol use for the purpose of diagnosing alcoholism. Short of shaving your entire body, there is no way to avoid the results.