{"id":13647522,"url":"https://github.com/tkrajina/git-plus","last_synced_at":"2025-04-05T09:07:14.724Z","repository":{"id":8635475,"uuid":"10282661","full_name":"tkrajina/git-plus","owner":"tkrajina","description":"Git utilities","archived":false,"fork":false,"pushed_at":"2024-05-27T10:37:58.000Z","size":97,"stargazers_count":199,"open_issues_count":4,"forks_count":24,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-03-29T08:08:55.901Z","etag":null,"topics":["command-line-tool","git","git-multi"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tkrajina.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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":"2013-05-25T10:27:25.000Z","updated_at":"2025-03-23T05:47:37.000Z","dependencies_parsed_at":"2024-06-21T16:50:44.286Z","dependency_job_id":null,"html_url":"https://github.com/tkrajina/git-plus","commit_stats":{"total_commits":108,"total_committers":12,"mean_commits":9.0,"dds":"0.16666666666666663","last_synced_commit":"c70002c5de0f16b128af52188adb996972e380d9"},"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tkrajina%2Fgit-plus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tkrajina%2Fgit-plus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tkrajina%2Fgit-plus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tkrajina%2Fgit-plus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tkrajina","download_url":"https://codeload.github.com/tkrajina/git-plus/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247312078,"owners_count":20918344,"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":["command-line-tool","git","git-multi"],"created_at":"2024-08-02T01:03:37.550Z","updated_at":"2025-04-05T09:07:14.500Z","avatar_url":"https://github.com/tkrajina.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# Git plus\n\nGit plus is a set of git utilities:\n\n * **git multi** execute a single git command on multiple git repositories\n * **git relation** show a relation between two branches/commits/tags\n * **git old-branches** find old/unused branches\n * **git recent** list branches ordered by last commit time\n * **git semver** lists and creates git semver (semantic versioning) tags\n\n## Installation\n\nAdd this directory to your $PATH:\n\n    export PATH=$PATH:/path/to/git-plus\n\nOn OSX using brew:\n\n    brew install git-plus\n\nOr using pip:\n\n    pip install git-plus\n\n## Git multi\n\nIf you have repositories ~/projects/repository1, ~/projects/repository2, ~/projects/repository3, ~/projects/repository4, ... First go to:\n\n    cd ~/projects\n\nCheck the status of all repositories:\n\n    git multi status\n\n...which is the same as:\n\n    git multi\n\nExecute \"git gui\" only on repositories which contain some changes:\n\n    git multi -c gui\n\nSwitch to \"master\" for all repositories:\n\n    git multi checkout master\n\nCreate a \"test\" branch on all repositories and checkout it immediately:\n\n    git multi checkout -b test\n\n...and so on. The basic usage is simple \"git multi normal_git_commands_here\". In addition to this, \"git multi -c git_commands\" will execute \"git_commands\" only on changed repositories and \"git multi -b\" will show the current branch for all repositories.\n\nIf you want your \"git multi\" commands to always execute all except some repositories add them to the file \".multigit_ignore\" in the same directory. You could also pass a list of repos to exclude as a command line flag: `git multi -e repository1,repository2 status`.\n\nWith:\n\n    git multi -a\n\nA .tar archive named git-repositories-yyyy-mm-dd-hh-mm.tar with all repositories in this directory (i.e. their .git directories) will be created.\n\nIf you have a nested structure of repositories, e.g. ~/project1/repository1, ~/project1/repository2, ~/project2/repository3, use\n\n    git multi -d 2\n\n... or a different number to look for git repositories up to the specified depth.\n\n### Group by output\n\nIf you have many projects with same git command output, for example:\n\n    git multi status\n\n    aaa:\n    \t# On branch master\n    \tnothing to commit (working directory clean)\n    bbb:\n    \t# On branch TRUNK\n    \tnothing to commit (working directory clean)\n    ccc:\n    \t# On branch master\n    \tnothing to commit (working directory clean)\n    ddd:\n    \t# On branch master\n    \tnothing to commit (working directory clean)\n    eee:\n    \t# On branch TRUNK\n    \tnothing to commit (working directory clean)\n\nYou can configure multi git to group projects with same output together:\n\n    aaa, ccc, ddd:\n    \t# On branch master\n    \tnothing to commit (working directory clean)\n    bbb, eee:\n    \t# On branch TRUNK\n    \tnothing to commit (working directory clean)\n\nThis can be done by setting:\n\n    git config --global 'multi.groupbyoutput' 1\n\nOr reset to default with:\n\n    git config --global --unset 'multi.groupbyoutput'\n\n## Git relation\n\nGit relation gives you the relation between two commits/branches/tags. For example:\n\n    git relation master test-branch\n\n...will tell you if two branches are equals, or if master is AHEAD of test-branch or if master is BEHIND test-branch or if they diverged in some commit in history.\n\nFor example:\n\n    $ git relation master test-branch\n    master is AHEAD of test-branch\n\n    Commits from test-branch to master:\n      2176e45 Tomo Krajina git-multi in README, 18 hours ago\n      50b2f79 Tomo Krajina + README, 18 hours ago\n\nAnother example:\n\n    $ git relation branch-1 branch-2\n    branch-1 and branch-2 DIVERGED, common point is 7e0bb439dd2aef4ff0262afec0a98461489becae\n\n    Commits from 7e0bb439dd2aef4ff0262afec0a98461489becae to branch-1:\n      3d0246b Tomo Krajina js namespace, 3 weeks ago\n      60215aa Tomo Krajina Merge branch 'new-path-editor' into new-path-editor--js-namespace, 3 weeks ago\n      1e76deb Tomo Krajina js namespace, 5 weeks ago\n\n    Commits from 7e0bb439dd2aef4ff0262afec0a98461489becae to branch-2:\n      359eff6 Tomo Krajina form event functions, 5 hours ago\n      a99b5f8 Tomo Krajina ..., 3 weeks ago\n      1d3b97c Tomo Krajina Preparations for marker handler, 3 weeks ago\n      9546769 Tomo Krajina Removed all subscription stuff, 3 months ago\n\nBrief:\n\n    $ git -v relation branch-1 branch-2\n    branch-1 and branch-2 DIVERGED, common point is 7e0bb439dd2aef4ff0262afec0a98461489becae\n\nBy default, `git-rel` shows no more than 30 commits (if there are more some will be omitted). You can show the list of all commits with:\n\n    $ git relation -a branch-1 branch-2\n\nRelation between current branch and its upstream (for example `master` and `origin/master`):\n\n    $ git relation -u\n\nRelation between another branch and its upstream:\n\n    $ git relation -u dev\n\nRelation between `HEAD` and the highest semver tag:\n\n    $ git relation -sv\n\nRelation between `HEAD` and the second last semver tag:\n\n    $ git relation -svn 2\n\n## Git old-branches\n\nOld-branches can detect old/unused branches.\n\nFind local branches older than 10 days:\n\n    $ git old-branches -d 10\n\nFind remote branches older than 60 days:\n\n    $ git old-branches -r -d 60\n\nFind local and remote branches older than 120 days:\n\n    $ git old-branches -a -d 120\n\nFind only merged or unmerged old branches:\n\n    $ git old-branches -a -d 120 --merged\n    $ git old-branches -a -d 120 --no-merged\n\nFind and remove branches older than 10 days:\n\n    $ git old-branches -d 10 --delete\n    Branch old-branch is older than 10 days (13.89)!\n    Remove [y/N] ?\n\nNote that branches will not be removed unconditionally, you'll be asked once to confirm the deletion.\n\n# Git recent\n\nList branches ordered by last commit time:\n\n    git recent\n\nShow only remote branches:\n\n    git recent -r\n\nShow all branches (local and remote)\n\n    git recent -a\n\nShow only **last** 10 branches:\n\n    git recent -10\n\nShow only **first** 15 branches:\n\n    git recent 15\n\nIt can also be used to switch between recent branches:\n\n    $  git recent 5 -ch\n    [2]    1007.41 days: execute-command\n    [3]    1089.03 days: faster-mypy\n    [4]    1158.07 days: xoxys-master\n    [5]    1301.04 days: ktor-add_nixos_compatible_shebangs\n    Checkout to (1-5)?\n    2\n\nYou can also skip asking and, for example, just \"checkout to the 3rd most recent\":\n\n    git recent -chn 3\n\nSimilarly, use:\n\n    git recent -me\n\nTo ask which recent branch to merge (in the current branch).\n\n...or...\n\n    git recent -men\n\n...to merge the nth recent branch.\n\n# Git semver\n\nList all git semver tags (i.e. tags in the format `vX.Y.Z`):\n\n    git semver\n\nIncrease major version (`v1.2.3` -\u003e v`2.0.0`):\n\n    git semver --major\n\nIncrease minor version (`v1.2.3` -\u003e v`1.3.0`):\n\n    git semver --minor\n\nIncrease patch (`v1.2.3` -\u003e v`1.2.4`):\n\n    git semver --patch\n\n# License\n\nGit plus is licensed under the [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftkrajina%2Fgit-plus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftkrajina%2Fgit-plus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftkrajina%2Fgit-plus/lists"}