To add a Unity project to a local Git repository, and push the files up to GitHub, perform the following steps:
- Create a new Unity project (or make use of an old one), save the Scene, and quit Unity. For example, we created a project named project-for-version-control that contains the default SampleScene and a Material named m_red. It is the asset files in the Project panel that are the files that are stored on disk, and these are the ones you'll be version controlling with Git and GitHub.
It is important that all work has been saved and the Unity application is not running when you are archiving your Unity project since, if Unity is open, there may be unsaved changes that will not get correctly recorded.
- On your computer, copy the following folders into the folder of your cloned GitHub repository:
/Assets
/Plugins (if this folder exists - it may not)
/ProjectSettings
/Packages
- The folder after copying these contents is illustrated here...