Keeping Unity projects under revision control with git requires an editor project setting.

In Unity, go to Edit » Project Settings and select Editor group:


Assure the following settings:

  • Version ControlMode set to Visible Meta Files
  • Asset SerializationMode set to Force Text

In the root folder, create a .gitignore file that contains the following:

# This .gitignore file should be placed at the root of your Unity project directory
# Get latest from

# Asset meta data should only be ignored when the corresponding asset is also ignored

# Uncomment this line if you wish to ignore the asset store tools plugin
# /[Aa]ssets/AssetStoreTools*

# Autogenerated Jetbrains Rider plugin

# Visual Studio cache directory

# Gradle cache directory

# Autogenerated VS/MD/Consulo solution and project files

# Unity3D generated meta files

# Unity3D generated file on crash reports

# Builds

# Crashlytics generated file

Git ignore files can be automatically generated at GitHub during repository creation by selecting Unity: