Add the Assets, Packages, and ProjectSettings folders to your git repository at the same level as the .git, .gitattributes and .gitignore files. https://learn.unity.com/tutorial/set-up-version-control#