bash-git-prompt
brew install bash-git-prompt
v2.7.1
BSD-2-Clause
Informative, fancy bash prompt for Git users
73
30-day installs · #3948
235
90-day · #3911
1.2k
365-day · #3581
6.9k
★ GitHub stars · updated 4mo ago
Links
- https://github.com/magicmonty/bash-git-prompt
- GitHub: magicmonty/bash-git-prompt
- Brew formula source: Formula/b/bash-git-prompt.rb
Caveats
You should add the following to your .bashrc (or .bash_profile):
if [ -f "$HOMEBREW_PREFIX/opt/bash-git-prompt/share/gitprompt.sh" ]; then
__GIT_PROMPT_DIR="$HOMEBREW_PREFIX/opt/bash-git-prompt/share"
source "$HOMEBREW_PREFIX/opt/bash-git-prompt/share/gitprompt.sh"
fi
Raw metadata
{
"aliases": [],
"alternatives": [],
"build_dependencies": [],
"categories": [],
"caveats": "You should add the following to your .bashrc (or .bash_profile):\n if [ -f \"$HOMEBREW_PREFIX/opt/bash-git-prompt/share/gitprompt.sh\" ]; then\n __GIT_PROMPT_DIR=\"$HOMEBREW_PREFIX/opt/bash-git-prompt/share\"\n source \"$HOMEBREW_PREFIX/opt/bash-git-prompt/share/gitprompt.sh\"\n fi\n",
"conflicts_with": [],
"dependencies": [],
"deprecated": 0,
"deprecation_reason": null,
"desc": "Informative, fancy bash prompt for Git users",
"disable_reason": null,
"disabled": 0,
"enrichment_fetched_at": "2026-06-20T23:35:46+00:00",
"first_seen": "2026-06-20T23:34:18+00:00",
"full_name": "bash-git-prompt",
"github_default_branch": "master",
"github_last_commit_at": "2026-04-10T16:26:04Z",
"github_readme_excerpt": "# Informative git prompt for bash and fish\n\n[](https://gitter.im/magicmonty/bash-git-prompt?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge)\n\nThis prompt is a port of the \"Informative git prompt for zsh\" which you can\nfind [here](https://github.com/olivierverdier/zsh-git-prompt)\n\nA `bash` prompt that displays information about the current git repository.\nIn particular the branch name, difference with remote branch, number of files\nstaged, changed, etc.\n\n`gitstatus.sh` and `git-prompt-help.sh` added by [AKS](http://github.com/aks).\n\n## Examples\n\nThe prompt may look like the following:\n\n\n\n* ``(master\u21913|\u271a1)``: on branch ``master``, ahead of remote by 3 commits, 1 file changed but not staged\n* ``(status|\u25cf2)``: on branch ``status``, 2 files staged\n* ``(master|\u271a7\u2026)``: on branch ``master``, 7 files changed, some files untracked\n* ``(master|\u27162\u271a3)``: on branch ``master``, 2 conflicts, 3 files changed\n* ``(master|\u26912)``: on branch ``master``, 2 stash entries\n* ``(experimental\u21932\u21913|\u2714)``: on branch ``experimental``; your branch has diverged by 3 commits, remote by 2 commits; the repository is otherwise clean\n* ``(:70c2952|\u2714)``: not on any branch; parent commit has hash ``70c2952``; the repository is otherwise clean\n\n## Prompt Structure\n\nBy default, the general appearance of the prompt is::\n\n```plaintext\n(\u003cbranch\u003e \u003cupstream branch\u003e \u003cbranch tracking\u003e|\u003clocal status\u003e)\n```\n\nThe symbols are as follows:\n\n- Local Status Symbols\n - ``\u2714``: repository clean\n - ``\u25cfn``: there are ``n`` staged files\n - ``\u2716n``: there are ``n`` files with merge conflicts\n - ``\u2716-n``: there are ``n`` staged files waiting for removal\n - ``\u271an``: there are ``n`` changed but *unstaged* files\n - ``\u2026n``: there are ``n`` untracked files\n - ``\u2691n``: there are ``n`` stash entries\n- Upstream branch\n - Shows the remote tracking branch\n - Disabled by default\n - Enable by setting `GIT_PROMPT_SHOW_UPSTREAM=1`\n- Branch Tracking Sy",
"github_repo": "magicmonty/bash-git-prompt",
"github_stars": 6927,
"github_topics": [],
"homepage": "https://github.com/magicmonty/bash-git-prompt",
"homepage_og_description": null,
"homepage_og_image": null,
"homepage_title": null,
"installs_30d": 73,
"installs_365d": 1173,
"installs_90d": 235,
"keg_only": 0,
"keg_only_reason": null,
"last_seen": "2026-06-20T23:34:18+00:00",
"license": "BSD-2-Clause",
"llm_generated_at": null,
"llm_model": null,
"name": "bash-git-prompt",
"oldnames": [],
"one_liner": null,
"optional_dependencies": [],
"rank_30d": 3948,
"rank_365d": 3581,
"rank_90d": 3911,
"raw_hash": "b184c3180d8d4c03",
"recommended_dependencies": [],
"revision": 0,
"ruby_source_path": "Formula/b/bash-git-prompt.rb",
"tap": "homebrew/core",
"test_dependencies": [],
"uses_from_macos": [],
"version_head": "HEAD",
"version_stable": "2.7.1",
"versioned_formulae": [],
"why_use_this": null
}