#Unity git workflow

1 messages · Page 1 of 1 (latest)

young tulip
#

Anyone know a proper git workflow in that i can minimize conflicts?

#

When i and a friend want to merge commits and it happens that we both changed something in a scene resolving said conflict is a pain in the a**

#

any tips or best practices?

noble raft
#
  1. Use a proper git ignore

  2. Use prefabs everywhere so you're only editing them and not objects directly in the scene

  3. Minimize cross object referencing as those are scene changes

  4. Communicate who's owning what so you avoid conflicts. If someone is going to be lighting the scene, then work on something else, or track what you're doing so you know what to redo (again using prefabs)

brave jackal
#

Also set up Unity smart merge, which has a better understanding of Unity yaml than the default text merge does

young tulip
#

tysm for the tips @noble raft

another thing i should rethink about our current workflow is that we have our seperate branches just for the sake of not being in each others way

so we litereally have 1 branch each and when we feel like it we merge into main

needless to say this isnt optimal at all

do you recommend only using feature branches merging whenever the feature is finished, or are there better ways to approach this (I assume this is part of a basic git workflow anyway)

#

ty @brave jackal