{"id":19436514,"url":"https://github.com/mvarrone/git-utils","last_synced_at":"2026-05-09T06:32:12.398Z","repository":{"id":245986885,"uuid":"805283984","full_name":"mvarrone/git-utils","owner":"mvarrone","description":"Repository containing a Python 3 script for automate tasks related to Git","archived":false,"fork":false,"pushed_at":"2024-10-04T15:59:55.000Z","size":90,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-25T06:46:52.926Z","etag":null,"topics":["git","github","python3"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mvarrone.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-05-24T08:56:16.000Z","updated_at":"2024-10-04T15:59:59.000Z","dependencies_parsed_at":"2024-06-25T08:20:32.447Z","dependency_job_id":"c4a86d63-6e7f-4581-b57f-b35c1449f49a","html_url":"https://github.com/mvarrone/git-utils","commit_stats":null,"previous_names":["mvarrone/git-utils"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mvarrone/git-utils","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mvarrone%2Fgit-utils","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mvarrone%2Fgit-utils/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mvarrone%2Fgit-utils/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mvarrone%2Fgit-utils/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mvarrone","download_url":"https://codeload.github.com/mvarrone/git-utils/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mvarrone%2Fgit-utils/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265076118,"owners_count":23707513,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["git","github","python3"],"created_at":"2024-11-10T15:11:34.563Z","updated_at":"2026-05-09T06:32:07.362Z","avatar_url":"https://github.com/mvarrone.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"## git_push.py\n\nThis script automates the process of pushing all of the changes made to GitHub/GitLab via Git. \n\n### Process to be automated\n\nNormally, this process involves the following steps:\n\n1. Adding files to the staging area\n    \n    Command used to add all files to it: *git add .*\n2. Commit changes using *git commit -m \"some message\"*\n3. Finally, pushing changes using *git push -u origin master*\n\n### How it works\n\nThis script requires user to input a commit message and a branch name. Afterward, if everything goes OK, all changes should be automatically pushed.\n\n#### Notes\n\nThe script prompts for a commit message as a mandatory step and also prompts for a branch name which is a non-mandatory step: In case there is no input for it, Python will assume the value for the **branch_name_by_default** variable, defined in *git_push.py*, as the branch name to be used. Default value: master\n\n### Exceptions handled\n\nCode is capable of handling exceptions such as:\n\n- KeyboardInterrupt: raised on pressing Ctrl+C\n- subprocess.CalledProcessError: Deals with problems encountered during `subprocess.check_call()` execution. Related to problems that might occur when executing `git` commands\n\n### Execution interruptions\n\nThe script will halt its execution under the following conditions:\n1. **Git is not installed** on the system.\n2. An error occurs while executing any of the following Git commands:\n   - `git add`\n   - `git commit`\n   - `git push`\n3. The user manually stops the execution by pressing `Ctrl + C`.\n\nIf an error occurs, the corresponding error message will be displayed and it will be appended to a file named `logs.txt` for future reference.\n\nIn case the `logs.txt` file is not present at the same directory level of *git_push.py*, a new one will be created automatically. In fact, it is created once *git_push.py* is executed\n \n### Running the script\n\n```python \npy .\\git_push.py\n```\n\nYou will be asked to enter a commit message (mandatory) and a branch name (optional, defaults to master)\n\n### Example output\n\nYour execution should be outputting similiar as follows:\n\n![alt text](success_output.png)\n\n### Latest improvements\n\n- Added logging support","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmvarrone%2Fgit-utils","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmvarrone%2Fgit-utils","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmvarrone%2Fgit-utils/lists"}