{"id":13835721,"url":"https://github.com/ricardobeat/git-commands","last_synced_at":"2025-08-22T05:30:55.236Z","repository":{"id":25816310,"uuid":"29255424","full_name":"ricardobeat/git-commands","owner":"ricardobeat","description":"Custom power-user git commands.","archived":false,"fork":false,"pushed_at":"2024-07-11T09:51:40.000Z","size":27,"stargazers_count":46,"open_issues_count":0,"forks_count":3,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-11-28T07:20:55.872Z","etag":null,"topics":["git","git-addons","git-tool","shell"],"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/ricardobeat.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":"2015-01-14T17:06:50.000Z","updated_at":"2024-07-11T09:51:44.000Z","dependencies_parsed_at":"2024-11-16T09:04:56.957Z","dependency_job_id":"111bda3b-71c3-444a-b4cd-22e4697add9d","html_url":"https://github.com/ricardobeat/git-commands","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ricardobeat%2Fgit-commands","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ricardobeat%2Fgit-commands/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ricardobeat%2Fgit-commands/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ricardobeat%2Fgit-commands/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ricardobeat","download_url":"https://codeload.github.com/ricardobeat/git-commands/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230561013,"owners_count":18245324,"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-addons","git-tool","shell"],"created_at":"2024-08-04T14:01:11.184Z","updated_at":"2024-12-20T09:06:11.210Z","avatar_url":"https://github.com/ricardobeat.png","language":"Shell","funding_links":[],"categories":["Shell"],"sub_categories":[],"readme":"# git-commands\n\nA collection of useful git commands.\n\n## Installation\n\nClone the repo and add it to your `PATH`:\n\n```shell\ngit clone https://github.com/ricardobeat/git-commands ~/.git-commands\n\necho export PATH=\"$PATH:$HOME/.git-commands\" \u003e ~/.zshrc # use .profile for bash\n```\n\n### git author-stats\n\nOutput number of lines added / removed by `author`\n\n    ★ git author-stats Pietro\n    Added: 116461, removed: 80818, total: 35643, modified: 197279 lines\n\n### git delete-merged-branches\n\nDelete all branches that have already been merged into master.\n\n### git dig\n\nSearch for commits that include `string` in their change set.\n\n    ★ git dig new_feature_flag\n\n### git find\n\nFind files containing the search strings, in any order. For example:\n\n    ★ git find modules main modal js\n    main/lib/modules/modal/index.js\n\n### git grep-rank\n\nDisplay authors of files containing `string`, ranked by frequency.\n\n    homebrew-core ★ git grep-rank dumb\n    10 matches for 'dumb'\n       5 s172262\n       3 Dominyk Tiller\n       1 Zhiming Wang\n       1 Fred McCann\n       1 David Holm\n\n### git open\n\nSimultaneously open all changed files using `$EDITOR`, according to `git status`. Lets you pick up\nwork in progress without depending on editor 'projects' state.\n\n### git rank\n\nDisplay ranking of authors by number of commits + extra stats.\n\n![git-rank](https://cloud.githubusercontent.com/assets/97396/22784387/1e237d4e-eed0-11e6-9527-16c3e79e1158.png)\n\n### git remaster\n\nWhile working in a branch, `fetch` latest `master`, then rebase current branch on top of that. Use\nto keep in sync with main development branch.\n\n### git repush\n\nDelete remote branch, then push again. To work around `-f` restrictions. Bails out if branch name is\n`master` or `trunk`.\n\n### git shower\n\nRun GC + prune. Optimized for a huge (~100k files) repository, might not work for you.\n\n### git size [commit]\n\nShow the size in bytes introduced (or removed) by a specific commit. Accepts any ref identifier\nthat git understands: hashes, `HEAD^`, etc.\n\n### git snapshot [note]\n\nCreate a named stash, including an optional text note. This will _not_ be featured in the stash list,\nonly in reflog (and will be GCed at some point). Use as safety checkpoints while furiously changing code.\n\n### git sort [hashes]\n\nSort a list of SHA1 commit hashes by their ordering in the history. Defaults to looking at the past 1000 commits,\ncan be overriden by setting the `N` environment var.\n\n    git sort 2d5cbab63ba cf39029de04 61bdf05bbc1\n    cf39029de04\n    61bdf05bbc1\n    2d5cbab63ba\n\n    cat shas.txt | git sort\n    cf39029de04\n    61bdf05bbc1\n    ...\n\n### git stash-merge\n\nCommands like `git stash pop` will refuse to apply over a dirty tree, even when an automatic merge is possible.\n\nThe `stash-merge` command will create a new stash object from your state and try to `merge` them together.\n\nIn case the the merge fails you still have both in stash list.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fricardobeat%2Fgit-commands","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fricardobeat%2Fgit-commands","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fricardobeat%2Fgit-commands/lists"}