Correct setup for Craft 3 and Git New to Craft and general novice full stop. I'm not sure about the correct way to use craft and git together. I currently use BitBucket for version control and have been using ExpressionEngine... so installing Craft and understanding the proper workflow is a bit confusing to get my head around.

I installed Composer locally and ran the command to install Craft 3, but then I just ended up putting all those files into BitBucket and then connecting that with my server, I created a database and then installed Craft on the server instead of locally. I have a feeling that's the wrong way to go about it, especially after reading that I shouldn't be putting the .env file in version control (which I can't understand?? if the .env file doesn't make its way to the server how does Craft know what database, etc. to connect to?)

Can anyone tell me or point me in the right direction to how I can learn the propper/correct flow and setup? 

Thanks
This article might be of use to you: Setting up a New Craft CMS 3 Project

The DEPLOYMENT section talks about using Composer to install our dependencies, and not checking them into Git. That means a .gitignore that excludes vendor/

This isn't really a right or wrong situation, but rather that the advantages slightly outweigh the disadvantages, imo.

If you want to see this all live in action, you can see the devMode.fm website Github repo which is an OSS example Craft CMS website that powers the devMode.fm podcast.