Closed zchmielewska closed 11 months ago
import subprocess
# Define the Git command to check for local changes
git_status_command = "git status --porcelain"
# Run the Git command
result = subprocess.run(git_status_command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True)
if result.returncode == 0:
if result.stdout:
print("There are local changes.")
else:
print("No local changes.")
else:
print("Error running Git command.")
Now it will be like this in the log in case of local changes:
Git commit: 9e1fbc7bdc00e9dce724406d987947fec0cb127d (with local changes)
Implemented in: 76061ec23309c46aa30b3e0a413e39562693c453
Currently, there is a git commit in the log. But what should be the approach if the user does local changes? Should the git commit stay the same or should there be additional information about the local changes?