Skip to content

Instantly share code, notes, and snippets.

@stefanthaler
Created March 14, 2016 10:57
Show Gist options
  • Select an option

  • Save stefanthaler/038a034ff215a8577cb2 to your computer and use it in GitHub Desktop.

Select an option

Save stefanthaler/038a034ff215a8577cb2 to your computer and use it in GitHub Desktop.
TexStudio macro that automatically commits the project folder, adds a commit message and pushes it to origin master
%SCRIPT
dialog = new UniversalInputDialog()
dialog.setWindowTitle("Git Commit")
dialog.add("[]", "Git Comment", "comment")
if (dialog.exec() != null) {
comment = dialog.get("comment")
buildManager.runCommand("git add .", editor.fileName())
buildManager.runCommand("git commit . -m \""+comment+"\"", editor.fileName())
buildManager.runCommand("git push origin master", editor.fileName())
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment