No one can serve two masters; for either he will hate the one and love the other, or he will hold to one and despise the other. You cannot serve God and mammon. Matthew 6:24
The word hate is used in different ways in the original Greek language. One of the ways is showing preference of one over another. Anytime God commands us to hate, we can be sure it is showing preference. With God we have a perfect love/hate relationship. Our love for Him is so strong, it makes our relationships with others look like hate. That kind of hate glorifies God and helps our relationship with everyone.