You won't stay germ free. You are touching things everyone else is touching, in a building full of other people.
You can limit your chances of contracting something by showering very well after, wiping down weights/machines before and after using them and limiting your physical contact with other people and their things.
This is possible to stay germ free in the gym here is some tips to help you Keep your hands clean: Use the wipes, soap and hand sanitizer provided by your gym after each set, or bring your own if necessary. This is essy way to to stay germ free. Keep your workout attire clean. Clean your gym bag, workout clothes, and shoes after each workout. Germs multiply and spread to the car and the rest of your body. If you wear the same shorts to the gym daily, wash them daily, too. A good idea is to keep your dirty clothes in a plastic bag to throw straight into the washer. This helps to keep them from touching your gym bag. Break a Sweat: The gym is a place to sweat and guests need a way to cool down or wipe off. Make sure your gym has a plentiful supply of towels to hand out to guests. Assign a staff member to hand out towels to guests that may have forgotten to grab one, as guests will appreciate it!
it given that you are holding equipment's that everyone does holding it is better that you should go have some shower after you gym session that the easiest and good way taking off germs as you are asking and another just bring your own gym personal things that's all.