Locally in the terminal after creating a file named foobar.scpt I go to cd the location of the repo locally and I run git add .

I then commit the file using git commit -m "Adding foobar.scpt"

Afterward I use git push origin http://location-of-repo

The file, foobar.scpt exists in the Github repo master branch. When I click on the file it will not show me the raw code but indicates it as an executable and only provides a RAW link for download.

How can I push the script file in the terminal to the repo and allow anyone that has access to that repo the ability to see the raw code instead of a download?


If you want it not to be a binary file and easily viewable, then save or export as text. It will be saved as plain text with a .applescript extension.

Also, by default, when saved locally and double-clicking on a .applescript file, it will load in Script Editor, where it can then be either saved as or exported as a .scrpt, .scrptd or .app.

  • but that doesn't solve the issue if I upload an app and it uploads all files and the stores main.scpt only allows for raw download and wont allow a git to record the revisions if I recall renaming main.scpt to main.applescript will not allow the app to run. – ʀ2ᴅ2 Jan 27 '18 at 3:45
  • @DᴀʀᴛʜVᴀᴅᴇʀ, You said, "but that doesn't solve the issue if I upload an app", well nowhere in your OP did you mention uploading an app, you mentioned specifically uploading an individual .scpt file, however that said... AFAIK binary files are not viewable as RAW, they can only be downloaded from there. If you want your AppleScript code to be viewable in RAW format then you need to upload it as plain text, regardless of the file extension, like everyone else that does it to have their code viewable in RAW format they do as I mentioned in my answer. – user3439894 Jan 27 '18 at 14:49
  • @DᴀʀᴛʜVᴀᴅᴇʀ, The only suggestion I have for you is to have a section for your apps and or binary files and also have a separate section providing code in a format that github can view in RAW format too. – user3439894 Jan 27 '18 at 14:49
  • I think I solved it over the night, testing now and will post as an answer. – ʀ2ᴅ2 Jan 27 '18 at 14:50

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .