if they got close i would knock them back with the butt of my rifle/shotgun/whatever, knocking them off balance, giving you the advantage of a good shot.
There are three different scenarios I will account for here
Slow-ass horde zombies: Problem with that strategy is that you'll attract a horde. Attempting to knock them back will result in getting bitten. Likely your resolve will not be enough to overcome the pain of teeth tearing into your flesh, and then you dead.
Fast zombies: You'll get bitten in close proximity. If not then you'll attract zombies and then you dead.
Armed hostiles: They have guns brother you dead.
Still counting my plan as the most reasonable.