The problem is, when I try to run the build, it errors saying " could not find .git directory". So I checked TeamCity's work directory on my agent for my project, and there is no .git directory!
Why doesn't TeamCity create the .git directory? Is there a way to enable this?
Team city version : 8.0.6 i am attaching snapshots of teamcity VCS settings.


VCS checkout mode / "on agent" should do the trick. Provided you do have the VCS root attached (which seems on the screenshot like you do not).