How to set up GitHub for Unity (Marin)


Hello, I'm Marinel Tinnirello (Galaxias Æon), the Technical Director for City of Abominations.  In this dev log, we'll be going over how we set up GitHub for Unity.

Since Unity is source control-agnostic, there is no one recommended source control repository.  Many people will default to GitHub due to its accessibility and the fact that it's free.  There isn't any standard way to remedy a lot of the errors that come with Unity's source control, however, I will detail what we used to get our repository up and running.

------------------------------------------------------------------------------------------

  1. Download GitHub LFS (for the large files we're eventually going to encounter, plus we want it for handling certain file formats)
  2. Create GitHub repository using .gitignore for Unity
    1. Put at the root of the Unity folders in the local repository
  3. Configure Unity for version control (should be by default as of Unity 2020, but just check)
    1. Go to editor settings (Edit > Project Settings > Editor)
    2. Make ".meta" files visible so there won't be broken object references (Version Control / Mode: “Visible Meta Files”)
    3. Force plain text so there's no merge conflict (Asset Serialization / Mode: “Force Text”)
  4. Create a ".gitattributes" file to force certain file types to go through Git LFS (use the template below)
    1. Put at the root of the GitHub folders in the local repository

------------------------------------------------------------------------------------------


Get City of Abominations (2021)

Leave a comment

Log in with itch.io to leave a comment.