Programmatically printing git revision and checking for uncommitted changes
- by Andrew Grimm
To ensure that my scientific analysis is reproducible, I'd like to programmatically check if there are any modifications to the code base that aren't checked in, and if not, print out what commit is being used.
For example, if there are uncommitted changes, it should output
Warning: uncommitted changes made. This output may not be reproducible.
…