The new code uses the subprocess.run method instead of the deprecated subprocess.getoutput method. This makes the code more up-to-date and compatible with the latest version of Python.
The new code uses the result.returncode attribute to check if a command was executed successfully, instead of relying on the output of the command. This is a more robust way to check if a command succeeded or failed.
The new code prompts the user for input in a more user-friendly way, by providing default values that can be used if the user simply presses Enter.
The new code includes error handling, by printing an error message and exiting the script if any of the Git commands fail.
The new code includes more descriptive comments that explain what each line of code does, making it easier to understand and modify the script.
Fixes #1410
Type of change
[x] New feature (non-breaking change which adds functionality)
[x] Documentation Update
Checklist:
[x] My code follows the style guidelines(Clean Code) of this project
[x] I have performed a self-review of my own code
[x] I have commented my code, particularly in hard-to-understand areas
[x] I have created a helpful and easy to understand README.md
[x] I have made corresponding changes to the documentation
[x] My changes generate no new warnings
[x] I have added tests/screenshots(if any) that prove my fix is effective or that my feature works
Description
The new code uses the subprocess.run method instead of the deprecated subprocess.getoutput method. This makes the code more up-to-date and compatible with the latest version of Python.
The new code uses the result.returncode attribute to check if a command was executed successfully, instead of relying on the output of the command. This is a more robust way to check if a command succeeded or failed.
The new code prompts the user for input in a more user-friendly way, by providing default values that can be used if the user simply presses Enter.
The new code includes error handling, by printing an error message and exiting the script if any of the Git commands fail.
The new code includes more descriptive comments that explain what each line of code does, making it easier to understand and modify the script.
Fixes #1410
Type of change
Checklist:
README.md