Don't hire assholes. If you have assholes on your team, find a way to get rid of them quickly, and replace them with people who are not assholes.
I don't really care - and neither should you - if the person is the most technically amazing person that has ever graced the Earth. If they are an asshole, it will sow resentment, make your team less effective, and make your job harder in the long run.
Not sure if you have assholes? Start weekly 1-on-1s with each team member. These are good practice in general, to help find and solve problems before they become major issues. But you will also be able to pick out the assholes pretty quickly.
You may think I am being silly, but I am not. If you think back to any unpleasant experience you have ever had at work, I am willing to put money on the fact that it was caused by someone who was an asshole.
Ridding your team - and hopefully, your entire organization - of these types of people will result in a group of people who are willing to do anything for you or each other.