Skip to content
Filter to put OSA languages (AppleScript, JavaScript) into git
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


Filter to put OSA languages into a git-repository. So you can put your .scpt-file (AppleScript, JavaScript) into your git-repository, and get full textual diff support.


Either clone this repository, or download the latest release and unzip it to a folder where you want to install it.

Configure the filter by running the following command:

./ configure

For every reporistory you want to use it, put the line *.scpt filter=osa in the gitattributes of your repository. Do this by running the command below in the root of your repository:

echo "*.scpt filter=osa" >> .gitattributes


If you want to add your own git configuration, use the following configure command:

./ configure --no-git

To reset the configuration, run this command:

./ reset

If you have trouble with the script, switch on logging with:

./ configure --git-log

Logging can be found in ~/Library/Logs/Catsdeep/osagitfilter.log and can be easy inspected with

Some git-clients, like GitHub Desktop, can be quite chatty so log files grow quite fast. With the following command you can create a new log file, while preserving the old ones:

./ rotate

Default, it prevents from accidently committing AppleScript files with Debugging Mode (from AppleScript Debugger) switched on. Run osagitfilter --help to see more options.

I've setup a demo repository with different .scpt-files.


If you want to (re-)apply osagitfilter to a repository (for example, if you already added your binary .scpt file to git, but want to use osagitfilter), execute the following statement:

git add --renormalize .


Based on this answer by Daniel Trebbien on stackoverflow and help from guys on the Script Debugger Forum.

You can’t perform that action at this time.