Use the dishwashing gloves that happyturtle suggested and rub your hands in a circle in one area on the carpet.
Lots of hair on carpet.
Hold like a regular broom but do not push.
Get a painting roller and wrap it with thick double sided duct tape.
If you are trying to remove long hair in your carpet you would want to use short deliberate strokes.
It d be a lot of work for large areas though.
For problem areas i tape together a square of masking tape about a foot 0 3 meters on a side and press that onto the carpet after a stiff brushing.
Anyway you need two cups of water and a tablespoon each of white vinegar and dish detergent.
Use it by pulling it towards yourself.
Now roll it over your carpet.
Add several drops of fabric softener.
Longer more regular style sweeping will still collect some but for a better charge and deeper clean keep the movements short and firm.
Spray the carpet lightly to dampen the hair and prime it to clump together.
Dish soap is an obvious cleaner and the benefits of vinegar rinse for removing old hair dye are well known.
Fill a spray bottle with water.
It ll take a while to do the whole carpet like that but it balls up the hair and makes it easier to gather.
It works well on carpets.
You can buy one or simply can make one yourself.
The sticky roller is an interesting kind of product to get long hair from carpet.