I love @DanielTrebbien's solution, but it is a little too complex for me to expect people to implement in order to use for my github project. A simpler option that just empowers you to see text changes in the diff is to tell the diff process to textconv with osadecompile.
Add to .gitattributes
*.scpt diff=scpt
Add to .git/config
[diff "scpt"]
textconv = osadecompile
binary=true
$ git diff
--- a/AppleScript-droplet.app/Contents/Resources/Scripts/main.scpt
+++ b/AppleScript-droplet.app/Contents/Resources/Scripts/main.scpt
@@ -1,3 +1,3 @@
-on open filelist
- ## Set useTerminal to true to run the script in a terminal
- set useTerminal to true
+on open file_list
+ ## Set use_terminal to true to run the script in a terminal
+ set use_terminal to true
Big thanks to @DanielTrebbien for his answer that lead me to osadecompile.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…