Git and the pre-push check
If your game is in a Git repository, Tsumugi checks the story before every push. If something would break the game, it stops the push and says what. It is on unless you turn it off.
How it works
When Tsumugi starts, it adds a pre-push hook to each game that is in a Git repository. Before every push, the hook runs the same check as Tsumugi: Check the Story (Problems and checks).
- Only broken problems stop a push. Needs code and needs art never do.
- The hook works in any Git tool, and from the command line.
- Tsumugi keeps the hook up to date when Tsumugi updates.
Note
If your repository already has its own pre-push hook, Tsumugi leaves it alone. It never changes or removes a hook it didn’t write.
When a push is stopped
The push prints each broken problem, with its file and line. Fix them, and push again.
To push once without the check:
git push --no-verify
If the check can’t run on a computer, the push goes ahead, with a message saying why.
Turn it off
Untick Check the story before every Git push in the Settings tab, or set tsumugi.prePushCheck to false in VS Code’s settings. Tsumugi removes its hook.
The switch is saved for this workspace, so you can turn it off for one game and keep it for others.
Your files and Git
Everything Tsumugi writes is a normal file in your game: .yarn files, tsumugi.json, sprites and scripts. Commit them like any other file. Git shows every change Tsumugi made.
The one exception is your test start (Testing in GameMaker): Git leaves it out of your commits on your computer, so it never changes where your team’s Run starts.