Use clasp to manage your apps script project and push to Google apps script from a local git repo which you can also push to GitHub.
I wrote stubs for the relevant apps script APIs and was able to run tests locally as well: https://github.com/wffurr/safe-contract-validator/blob/maste...