Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice
  2. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  3. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

[ShaderGraph][Git-LFS] Should I need to use git-lfs save .shadergraph file?

Discussion in 'Graphics Experimental Previews' started by 479813005, Mar 18, 2019.

  1. 479813005

    479813005

    Joined:
    Mar 18, 2015
    Posts:
    71
    __IBVA2BX1W$AV1LRCT}H7O.png
    If I just move some node in the graph, the whole line will change. Should I need to use git-lfs save .shadergraph file?
     
  2. ph_

    ph_

    Joined:
    Sep 5, 2013
    Posts:
    232
    To decide whether to track a file type with git-lfs or not, I usually use those questions:
    • will you need to diff / merge two files (because this can't be done using git-lfs) ?
      • If the answer is NO, then you can track it with git-lfs. Usually this is because it isn't a text file, or the format makes it very hard to diff (like the .shadergraph).
      • If the answer is YES or MAYBE, then surely don't track it with git-lfs !
    • is the file big ? Depending on your max storage capacity you might need to track a file using git-lfs even though it could be diffed / merged (an example is a FBX file in text format).
    That's it ! Because of the first point, I do track my .shadergraph using git-lfs, and I commit changes that are as small and atomic as possible, with very descriptive commit message (which is always a good idea anyway).
     
    479813005 likes this.
  3. MadeFromPolygons

    MadeFromPolygons

    Joined:
    Oct 5, 2013
    Posts:
    3,997
    Unless it is over ~50mb I usually dont put things in LFS, regardless of file type. Just put it in normal git, LFS is only for what it says in the tin - large file storage.
     
  4. andybak

    andybak

    Joined:
    Jan 14, 2017
    Posts:
    569
    Or - Unity should fix the shadergraph serialization so that it doesn't become unusable with version control...

    I'm unhappy that none of the new serialized asset files are even remotely human editable. It would have been a huge benefit in many ways.