Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save wfarr/92189 to your computer and use it in GitHub Desktop.
Save wfarr/92189 to your computer and use it in GitHub Desktop.
--[[
VPLanguage = lua
VPScriptMenuTitle = GitHub Commit
VPEndConfig
]]
-- we assume git is located in PATH
posix.chdir(document:fileName())
-- add new files
os.execute("git add -A")
-- clean up deleted pages
os.execute("git rm `git status | grep 'deleted:' | sed -e 's/.*deleted:[ ]*//g'`")
os.execute("git commit -a -m 'auto commit'")
os.execute("git push")
os.execute("git status")
vpconsole("Commit complete.")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment