How to share the code with my team?

I’m working with a team on a game and was planning on sharing the code to a repository on GitHub. I was wondering if will work for sharing the code with my team? I am also a little confused by the gitignore do i need one? and if so where should i put it?

You can share your code on github or any repository provider, keep in mind that if you use github, it will be public unless you pay for a private plan. Bitbucket currently has free private repository for less than 5 contributors I think. You can also host your own gitlab

Using git to share code is the right thing to do.
Use the following Unity .gitignore file and place it at the root of your project (where your unity project is) and name it .gitignore. Then you can do the usual steps to start a repository.

Also note that the .gitignore will only be effective for untracked files which means that if you’ve already added files to git before using ignoring files, they will still be tracked. One way to solve this is to delete the files listed by the .gitignore with git rm command and commit this.

Awesome! Thank you for the info. This is probably a stupid question, but I am new to all of this. Will the dev. team have access to the whole unity project and all the changes? Or will it just be the scripts?