I have a slightly unusually situation: I have scripts that I make small changes to frequently, and that take hours to execute.
I save output logs, but more importantly I need to make sure that the code which produced a given log will not be lost.
Committing changes before each run will work, but I'd like to enforce this automatically by preventing my code from running if git is not up to date.
Is there a simple way to do this, or is running shell commands and scraping output my best bet?