Git version control integration for Scratch (TurboWarp) that just works and makes sense
https://github.com/ajskateboarder/scratch-git/assets/81255936/4374d0a8-1d89-4aad-a968-5919a63b6b27
The goals of this interface is to:
scratch.git works by modifying TurboWarp Desktop through a userscript. Git interfacing is done between the desktop GUI and the local computer through a WebSocket interface between the userscript and a small server.
To get started:
Install these things:
Download the scratch.git release for your system from the Releases section
Unpack the zip or tar.gz and run the scratch.git executable - it'll run continuously until you close out the terminal or do Ctrl+C
Congrats, you are now a 🦄✨~ 1000x developer ~✨🦄, no Git skills required!!
You should now see:
a welcome dialog to set up a project with scratch.git
a Git menu to view commits, configure an online repository on GitHub/GitLab/etc, push current commits, etc
diff indicators that show up next to your sprites and stage when you save the project. These will show differences between the code before and after you save.
These features closely mimic the kind of Git development seen in editors such as Visual Studio or VS Code, but in a more friendly manner.
Please note the following:
scratch.git releases are only made for 64-bit Windows, MacOS, and recent Linux versions such as Ubuntu 20.04. Other systems will need to build from scratch for now - contributions for other systems are greatly appreciated!
scratch.git will likely break when Git's locale is something other than English because we check for certain words from Git's output.
If you spotted a bug or any errors, please report bugs to the issue tracker.
scratch-git uses a derivative of Convential Commits which has been adapted to fit Scratch programming.
Changes are done by sprite and are separated by commas.
Commits start with the name of the sprite you are making changes to (e.g. Sprite1, Stage) with a colon afterwards (similar to CC).
Commits then specify the change they are making using one of the following statements:
Statement | Description |
---|---|
add [costumes] |
The following costumes: [costumes] have been added |
remove [costumes] |
The following costumes: [costumes] have been removed |
modify [costumes] |
The following costumes: [costumes] have been edited |
{+}{#}, {-}{#} blocks |
{#} number of blocks have been added (+ ) and removed (- ) |
This is implemented in src-server/diff/.
Sprite1: +3 blocks, add costume1.png, move.mp3, Stage: remove backdrop3
Player: +36 blocks, remove old-player, Cloud: +15 blocks
Thanks to:
@apple502j for parse-sb3-blocks
@tjvr for scratchblocks
@rokcoder-scratch for inspiration, sb3-commit
@GarboMuffin for TurboWarp