The two classes of gases that electricians are likely to encounter are asphyxiants and oxygen binders.
Nitrogen is an example of an asphyxiant. Nitrogen makes up about 78% of the air we breathe. Although it’s essential to human life, getting too much of a good thing is lethal. So what's the problem? Nitrogen suffocates you by displacing oxygen, as it does in vessels being purged.
Carbon monoxide (CO) is an example of an oxygen binder. Carbon dioxide (CO2) is one carbon atom bound with two oxygen atoms; that's the stable state that carbon and oxygen seek when present together. Electrical generators emit CO and nitrous oxide (another oxygen binder).
Asphyxiant defense. Always test the air before entering (or sticking your head into) any vessel. Follow confined entry procedures as if your life depends on it, because it does.
Oxygen binder defense. If you can smell exhaust gas, your ventilation is faulty. Ventilate more.