'Commit hash in python using subprocess.check_output()
I wish to get the current commit hash in my python script using the following command:
subprocess.check_output(['git', 'rev-parse', 'HEAD'])
It returns an empty string for some reason. When run on another system it seems to return the commit hash as expected. Does anyone know why?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
