{"id":23209337,"url":"https://github.com/djuuu/git-context-graph","last_synced_at":"2025-04-05T12:10:45.691Z","repository":{"id":151389771,"uuid":"579509063","full_name":"Djuuu/git-context-graph","owner":"Djuuu","description":"Show graph log of branch with its remote counterparts and default repository branch.","archived":false,"fork":false,"pushed_at":"2025-01-08T00:44:54.000Z","size":225,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-01T17:59:39.842Z","etag":null,"topics":["git","git-log"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Djuuu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2022-12-17T23:18:03.000Z","updated_at":"2025-01-08T00:44:57.000Z","dependencies_parsed_at":null,"dependency_job_id":"7480584d-7cca-407e-81d2-31d20bcdd091","html_url":"https://github.com/Djuuu/git-context-graph","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/Djuuu%2Fgit-context-graph","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Djuuu%2Fgit-context-graph/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Djuuu%2Fgit-context-graph/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Djuuu%2Fgit-context-graph/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Djuuu","download_url":"https://codeload.github.com/Djuuu/git-context-graph/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247332609,"owners_count":20921853,"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-log"],"created_at":"2024-12-18T18:16:36.973Z","updated_at":"2025-04-05T12:10:45.668Z","avatar_url":"https://github.com/Djuuu.png","language":"Shell","readme":"# git-context-graph\n\n[![Tests](https://github.com/Djuuu/git-context-graph/actions/workflows/test.yml/badge.svg)](https://github.com/Djuuu/git-context-graph/actions/workflows/test.yml)\n[![License](https://img.shields.io/badge/license-Beerware%20%F0%9F%8D%BA-yellow)](https://web.archive.org/web/20160322002352/http://www.cs.trincoll.edu/hfoss/wiki/Chris_Fei:_Beerware_License)\n\nShow graph log of branch with its remote counterparts and default repository branch.\n\nThis is a shortcut to `git log --graph` which provides a middle ground between\nshowing _only a given branch_ (which might lack context) and showing _all_ branches \n(which might get crowded on big projects).\n\n|                `git log --graph`                 |               `git log --graph --all`               |\n|:------------------------------------------------:|:---------------------------------------------------:|\n| ![git log --graph](doc/git-log-graph-single.png) | ![git log --graph --all](doc/git-log-graph-all.png) |\n\n|                **`git context-graph`**                |\n|:-----------------------------------------------------:|\n| ![git context-graph](doc/git-context-graph-large.png) |\n\n## Synopsis\n\n\u003ccode\u003e\u003cb\u003egit context-graph\u003c/b\u003e \u003ci\u003e[--local] [--no-default] [-a|--add] [\u0026lt;branch\u0026gt;...]\u003c/i\u003e\u003c/code\u003e  \n\u003ccode\u003e\u003cb\u003egit context-graph\u003c/b\u003e \u003ci\u003e[\u0026lt;git-log options\u0026gt;...] [\u0026lt;options\u0026gt;...] [\u0026lt;branch\u0026gt;...] [-- \u0026lt;paths\u0026gt;...]\u003c/i\u003e\u003c/code\u003e  \n\n\u003ccode\u003e\u003cb\u003egit context-graph\u003c/b\u003e \u003ci\u003e(-l|--list) [-s|--short] [\u0026lt;branch\u0026gt;]\u003c/i\u003e\u003c/code\u003e  \n\n\u003ccode\u003e\u003cb\u003egit context-graph\u003c/b\u003e \u003ci\u003e[\u0026lt;branch\u0026gt;...] (-A|--config-add) \u0026lt;additional_branch\u0026gt;...\u003c/i\u003e\u003c/code\u003e  \n\u003ccode\u003e\u003cb\u003egit context-graph\u003c/b\u003e \u003ci\u003e[\u0026lt;branch\u0026gt;...] (-C|--config-clear) [\u0026lt;additional_branch\u0026gt;...]\u003c/i\u003e\u003c/code\u003e\n\n\u003ccode\u003e\u003cb\u003egit context-graph\u003c/b\u003e \u003ci\u003e(-h|--usage)\u003c/i\u003e\u003c/code\u003e\n\n## Description\n\nThis command is a shortcut to:\n```bash\ngit log --color --graph --abbrev-commit --decorate --pretty=oneline \\\n    my-branch origin/my-branch main origin/main ...\n```\n\n* \u003ccode\u003e\u003cb\u003egit context-graph\u003c/b\u003e \u003ci\u003e[--local] [--no-default] [-a|--add] [\u0026lt;branch\u0026gt;...]\u003c/i\u003e\u003c/code\u003e  \n  Show graph log of branch, its remote counterparts and default branch.\n\n* \u003ccode\u003e\u003cb\u003egit context-graph\u003c/b\u003e \u003ci\u003e[\u0026lt;git-log options\u0026gt;...] [\u0026lt;options\u0026gt;...] [\u0026lt;branch\u0026gt;...] [-- \u0026lt;paths\u0026gt;...]\u003c/i\u003e\u003c/code\u003e  \n  `git-log` options can be used to refine or customize the output  \n  (see git-log documentation: https://git-scm.com/docs/git-log)  \n  Ex:  \n  \u003ccode\u003egit context-graph --pretty=medium -- some/path\u003c/code\u003e\n\n* \u003ccode\u003e\u003cb\u003egit context-graph\u003c/b\u003e \u003ci\u003e(-l|--list) [-s|--short] [\u0026lt;branch\u0026gt;...]\u003c/i\u003e\u003c/code\u003e  \n  List branches that would be shown in the graph (does not display graph).\n\n* \u003ccode\u003e\u003cb\u003egit context-graph\u003c/b\u003e \u003ci\u003e[\u0026lt;branch\u0026gt;...] (-A|--config-add) \u0026lt;additional_branch\u0026gt;...\u003c/i\u003e\u003c/code\u003e  \n  \u003ccode\u003e\u003cb\u003egit context-graph\u003c/b\u003e \u003ci\u003e[\u0026lt;branch\u0026gt;...] (-C|--config-clear) [\u0026lt;additional_branch\u0026gt;...]\u003c/i\u003e\u003c/code\u003e  \n  For a given branch, persist additional context branches to git configuration.\n\n* \u003ccode\u003e\u003cb\u003egit context-graph\u003c/b\u003e \u003ci\u003e(-h|--usage)\u003c/i\u003e\u003c/code\u003e  \n  Show the help page.\n\n## Arguments\n\n* `\u003cbranch\u003e...`  \n  Branches to show graph for. If omitted, current branch will be used.\n\n## Options\n\n* `-a`|`--add`  \n  Consider `\u003cbranch\u003e` arguments as additional branches (added to current branch).\n\n* `--local`  \n  Show only local branches (ignore remotes).\n\n* `--no-default`  \n  Show only related branches (local and remote), without default branch.\n\n* `-l`|`--list`  \n  List branches that would be shown in the graph (does not display graph).\n\n* `-s`|`--short`  \n  Use short branch names when listing branches (without `refs/heads/` or `refs/remotes/`).  \n  Implies `--list`.\n\n* `-A`|`--config-add` `\u003cadditional_branch\u003e...`  \n  For a given branch, persist additional context branches to git configuration.\n\n* `-C`|`--config-clear` `[\u003cadditional_branch\u003e...]`  \n  For a given branch, remove additional context branches from git configuration.  \n  If no additional branch is passed, all configured additional branches will be removed.\n\n* `-h`|`--usage`  \n  Show command usage.\n\n## Installation\n\n* Add the `git-context-graph` directory to your `PATH`\u003cbr\u003e\n  in one of your shell startup scripts:\n  ```bash\n  PATH=\"${PATH}:/path/to/git-context-graph\"\n  ```\n\n_OR_ \n\n* Define it as a git alias:\u003cbr\u003e\n  run:\n  ```bash\n  git config --global alias.cg '!bash /path/to/git-context-graph/git-context-graph'\n  ```\n  or edit your `~/.gitconfig` directly:\n  ```\n  [alias]\n  \tcg = \"!bash /path/to/git-context-graph/git-context-graph\"\n  ```\n\nCompletion is available in `git-context-graph-completion.bash`. Source it in one of your shell startup scripts:\n```bash\n. \"/path/to/git-context-graph/git-context-graph-completion.bash\"\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdjuuu%2Fgit-context-graph","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdjuuu%2Fgit-context-graph","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdjuuu%2Fgit-context-graph/lists"}