Spray your garment with aerosol hairspray. This will help the glitter stay on the garment. However, if you wash the garment, you may need to repeat this step every time you wear the garment.
Wash the garment by hand, inside out.
Turn the garment inside out if you must wash it in the washing machine. It should be washed by itself.