.gitignore and .gitattributes for Unity projects
Find a file Use this template
2026-06-15 20:30:07 +02:00
.githooks Add Git LFS locking setup: policy, git-sync, onboarding 2026-06-15 20:30:07 +02:00
ProjectSettings Add Git LFS locking setup: policy, git-sync, onboarding 2026-06-15 20:30:07 +02:00
.gitattributes Added heading 2025-12-19 15:51:51 +01:00
.gitignore Cleanup 2025-12-19 15:44:44 +01:00
README.md Add Git LFS locking setup: policy, git-sync, onboarding 2026-06-15 20:30:07 +02:00
setup-locks.sh Add Git LFS locking setup: policy, git-sync, onboarding 2026-06-15 20:30:07 +02:00

Modern Unity Template

Includes .gitignore and .gitattributes, with LFS support.

Git LFS file locking

This template is ready for Perforce-style file locking with the unity-git-locks (WAY fork) plugin.

After cloning a project based on this template:

sh setup-locks.sh soft <your-forgejo-username>

That installs LFS, the UnityYAMLMerge driver, and a git sync alias (push + release your finished locks). The shared lock policy is committed in ProjectSettings/GitLocksConfig.json.

Then in Unity: add the plugin via Package Manager (https://github.com/wayexperience/unity-git-locks.git#v1.3.0), set Asset Serialization = Force Text and Version Control = Visible Meta Files, and put your username under Preferences > Git Locks.

Soft mode (advisory locks, recommended) keeps files editable and only blocks the push on files locked by others. Use setup-locks.sh hard for read-only enforcement.