Felt like trying out git hooks, so I hacked something together that makes version control for roblox (XML, e.g .rbxmx and .rbxlx) files plausible. It strips them of all the referent stuff, unless it’s actually used, in which case it gets substituted with a calculated one which should always be the same, unless there are collisions or the hierarchy changes. Also gets rid of the ScriptGuid string on scripts.
If you do this:
- Save model/place to file
- Commit file (with my hook stuff installed)
- Close studio and reopen model/place
- Save to file again
- Commit again
The second commit should fail as it should be empty (e.g. no difference between “both” files). My process.lua strips the XML of session-specific data (or replaces it with a calculated value) which makes this possible.
Works both on windows and other platforms (well, I use Windows and pre-commit seems to be a unix shell script, so if it works on windows…), only needs Lua to be installed and available as a global command (e.g. in PATH variable on windows)
Project page: https://github.com/einsteinK/Roblox-Version-Control