How to turn on git syntax highlighting on vim on a Mac

I just figured out all I need is to create a ~/.vimrc file with a line that reads syntax on