In MacOS, Unity Editor will crash when I open a Unity project with an error "No git found"

Viewed 55

I found some articles that solved the title issue but I can not find out the issue solver for MacOS.

My environment.

  • MacOS
  • Unity 2020.3.30f1
  • Installed a git client (this client is provided by Apple that is installed with Xcode command line tools)

I am so wondered why I get the error because I was able to use a Unity editor with Git previously.

I am being getting the error suddenly. I am not sure when the editor started being crash.

1 Answers

"No Git found" does not necessarily mean Git is not installed.

It can also mean your Unity Editor does not find a local Git repository in the folder it is set for its project.

As mentioned here, as an example for a project stored on GitHub (you could use another third-party Git repository hosting service though):

  • create a GitHub account. Make sure you have 2fa set up
  • install GitHub desktop
  • Make sure that in unity edit -> project settings, under "editor" you have "Asset Serialization Mode" set to "Force Text";
    and under "Version Control" it is set to Visible Meta Files. (If needed, further instructions here: "How to set up a Unity project in GitHub")
  • Go to GitHub desktop and go to file -> add local repository.
    It will say no git found, would you like to create one.
  • Don’t add the gitignore they suggest
  • Make sure it’s set to private and say yes.
  • Put the Unity gitignore in the root folder:
    Note that the asset, library, etc folders need to be at the same level as the .gitignore file.
    So you have .gitignore, other files, the asset folder, the library folder, etc. all together.
    By default unity will create a new folder and you’ll have e.g. folder 1/folder 2/assets etc. If gitignore is in folder 1 it will create problems.
    With a blank project with no .gitignore, GitHub desktop will want to commit 20k files. With the .gitignore it will be about 30.
  • Commit via GitHub desktop
Related