From 54c3fe7e7779cad865cfb423bbcedfcbe4820c06 Mon Sep 17 00:00:00 2001 From: Mattia Trapani Date: Thu, 25 Jun 2026 16:55:15 +0200 Subject: [PATCH] Lockable rules for Git Waypoint + README targeting Git Waypoint --- .gitattributes | 33 +++++++++++++++++++++++++++++++++ README.md | 22 +++++++++++++++++++++- 2 files changed, 54 insertions(+), 1 deletion(-) diff --git a/.gitattributes b/.gitattributes index 0151d9c..03d860a 100644 --- a/.gitattributes +++ b/.gitattributes @@ -160,3 +160,36 @@ LightingData.asset binary *.pdf lfs *.doc lfs *.docx lfs + +# ------------------------------------------------------------------------- +# FILE LOCKING (Git LFS) — un-mergeable assets get an exclusive checkout. +# These are 'lockable': Git Waypoint auto-locks them, and they are the team's +# locking policy committed in the repo (single source of truth for everyone). +# ------------------------------------------------------------------------- + +# Scenes & serialized assets +*.unity lockable +*.prefab lockable +*.asset lockable +*.controller lockable +*.anim lockable +*.mat lockable +*.playable lockable +*.spriteatlas lockable +*.mixer lockable + +# Heavy binaries (art / audio / models) +*.fbx lockable +*.obj lockable +*.blend lockable +*.psd lockable +*.png lockable +*.tga lockable +*.tif lockable +*.tiff lockable +*.exr lockable +*.wav lockable +*.mp3 lockable +*.ogg lockable +*.aif lockable +*.aiff lockable diff --git a/README.md b/README.md index a36ae29..2a3115f 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,23 @@ # Modern Unity Template -Includes .gitignore and .gitattributes, with LFS support. +A starting point for Unity projects under Git, set up for an art team coming from Perforce. + +Includes: +- **`.gitattributes`** — Git LFS for all binary asset types, UnityYAMLMerge smart-merge for serialized + YAML, and **`lockable`** rules so un-mergeable assets (scenes, prefabs, models, textures, audio…) can be + locked. This is the team's locking policy, committed once so everyone shares it. +- **`.gitignore`** — the usual Unity ignores. + +## File locking with Git Waypoint + +This template is ready for Perforce-style file locking with **Git Waypoint**. + +1. In Unity: **Window ▸ Package Manager ▸ + ▸ Add package from git URL** + `https://github.com/wayexperience/git-waypoint.git#upm` +2. **Project Settings ▸ Editor**: Asset Serialization = **Force Text**, Version Control = **Visible Meta Files**. +3. Open **Window ▸ Git Waypoint ▸ Settings**, set your Git name/email, and turn on **Automatic file locking**. + +That's it — what's lockable is decided by the `lockable` rules in `.gitattributes` (above), so the whole team +locks the same files. Git Waypoint locks them automatically as you work and releases them when you push. + +New to this? Read the guide: **Git per artisti** (internal).