How do I setup Git for an UE4 project?

There’s no reason to put the .vcxproj files under source control because they are generated from the contents of the Source directory. Any changes to the project files made by the user will be lost anyway the next time the project files are regenerated.