Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Do I need git lfs for local repository?

Discussion in 'Scripting' started by CFK, Jan 12, 2020.

  1. CFK

    CFK

    Joined:
    Dec 13, 2014
    Posts:
    12
    If I only use git locally and only for me in just a single computer, will it necessary to use git lfs for large assets?
     
  2. dgoyette

    dgoyette

    Joined:
    Jul 1, 2016
    Posts:
    4,116
    Well, either Git LFS, or just don't commit large assets. In my fairly large project, the only assets large enough to be concerned with are lighting data and light maps. I use .gitignore to ensure those don't get committed. They're generated files, and it's just not worth committing them given how often they change and how easy they are to generate.

    What kinds of files do you have that are pushing 100MB?
     
  3. CFK

    CFK

    Joined:
    Dec 13, 2014
    Posts:
    12
    thank you dgoyette

    The files I concern are mostly images.
    I want include them as the version control.
    None of them is larger than 50mb.

    Thank you, I can forget about git lfs for now.
     
  4. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    36,711
    Yeah, until you start getting massive repos,
    git lfs
    can cause more headaches than its worth. For any reasonable size indie project you probably don't need it. But what @dgoyette said above to ignore things like lightmaps is also a great idea, since that data is derived, if you set the project up properly.

    ALSO, be sure you have a good .gitignore file going, one designed for use with Unity. You do NOT want to source control the contents of Library or Temp in your project, just Assets and ProjectSettings.
     
  5. CFK

    CFK

    Joined:
    Dec 13, 2014
    Posts:
    12
    Kurt-Dekker likes this.