{"id":19082211,"url":"https://github.com/sergei-mironov/git-powercommit","last_synced_at":"2025-04-30T08:23:51.834Z","repository":{"id":138471696,"uuid":"389442029","full_name":"sergei-mironov/git-powercommit","owner":"sergei-mironov","description":"Commit all the changes to your git submodules tree using a single command.","archived":false,"fork":false,"pushed_at":"2022-07-04T12:44:44.000Z","size":1275,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-18T23:59:33.533Z","etag":null,"topics":["git","git-commit"],"latest_commit_sha":null,"homepage":"","language":"Shell","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/sergei-mironov.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":"2021-07-25T21:13:33.000Z","updated_at":"2022-09-13T09:14:47.000Z","dependencies_parsed_at":"2024-07-06T11:30:50.057Z","dependency_job_id":"ffbb458e-6ff7-4987-aec7-19566247c4e3","html_url":"https://github.com/sergei-mironov/git-powercommit","commit_stats":null,"previous_names":["sergei-mironov/git-powercommit"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sergei-mironov%2Fgit-powercommit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sergei-mironov%2Fgit-powercommit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sergei-mironov%2Fgit-powercommit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sergei-mironov%2Fgit-powercommit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sergei-mironov","download_url":"https://codeload.github.com/sergei-mironov/git-powercommit/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251667266,"owners_count":21624458,"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","git-commit"],"created_at":"2024-11-09T02:42:26.363Z","updated_at":"2025-04-30T08:23:51.805Z","avatar_url":"https://github.com/sergei-mironov.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"Git Powercommit\n===============\n\nThis repo contains the end-user [shell script](./git-powercommit) implementing\n`git powercommit` command for committing and pushing the changes to your Git\nrepository. The script uses meaningless commit messages, performs pulls/stashes\nas required and supports git submodules. Thus we try to automate a typical work\nscenario of a lazy developer.\n\n**Disclaimer: Author tried to make this script clean and simple and even\nprovided a [test](./test.sh). But you know, Git is a complex thing, something\nmay not work as expected. Use this script at your own risk.**\n\nThe Powercommit algorithm in a nutshell:\n\n1. Check for changes, exit if there are none.\n2. Mark the current head with a branch `powercommit`. Exit if the branch already\n   exists.\n3. Call `git stash`\n4. Call `git pull --rebase`\n5. Apply the stash\n6. Call itself recursively for every git-submodule, unless `--no-recursive` is\n   given\n7. Commit every changed submodule\n8. Commit every changed regular file or folder, aggregating the files that\n   share a folder into a single commit.\n9. Push the repo upstream\n10. Remove the `powercommit` marker branch.\n11. Print a summary of untracked files. Highlight files which look like\n    source codes.\n\n\nUsage\n-----\n\n1. Drop this [git-powercommit](./git-powercommit) script into one of your PATH\n   folders.\n2. `cd your-git-repo`\n3. Make some changes\n4. `git powercommit`\n\n\u003cimg src=\"Screencast.gif\" alt=\"Screencast\" width=\"400\"/\u003e\n\n\nIf something goes wrong\n-----------------------\n\nIf the automation magic fails for some reason, you are advised to review the\n`/tmp/git_powercommit_$UID.log` logfile and recover to the starting state\nmanually:\n\n5. As one of its first steps, powercommit script pins the current state of the\n   repo with the `powercommit` branch. On the tip of this branch, it creates the\n   stash capturing the currently modified files. Here is how to revert repo to\n   the state just before `git powercommit` was called:\n    ```sh\n    git reset --hard \"powercommit\"; git stash pop; git branch -D \"powercommit\"\n    ```\n\nYou may need to repeat the above sequence for all submodules (recursive abort is\nstill in the TODO list). The script will refuse to run if the `powercommit`\nbranch already exists.\n\nAlso it is recommended to run the [test](./test.sh) script to check the script\ncompatibility on mock repos.\n\n\nTODO\n----\n\n* [x] Hide verbose logging into the logfile.\n* [x] Nix-expression.\n* [x] A Screencast.\n* [x] Notify about suspicious untracked files.\n* [x] A recursive dry-run mode of execution.\n* [ ] Commit added/removed files based on patterns.\n* [x] Make recursive recovering from failures.\n* [ ] A Manpage.\n* [ ] Neural network generating commit messages :pig:\n\n\nRelated links\n-------------\n\n* Git status porcelain v2 https://git-scm.com/docs/git-status#_porcelain_format_version_2\n* ANSI color codes in terminal https://stackoverflow.com/questions/5947742/how-to-change-the-output-color-of-echo-in-linux\n* StackOverflow on generating commit messages https://stackoverflow.com/questions/35010953/how-to-automatically-generate-commit-message\n* PwC: On the Evaluation of Commit Message Generation Models: An Experimental Study https://paperswithcode.com/paper/on-the-evaluation-of-commit-message/review/\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsergei-mironov%2Fgit-powercommit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsergei-mironov%2Fgit-powercommit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsergei-mironov%2Fgit-powercommit/lists"}