Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. ZSH Plugins
  3. posh-git-bash

posh-git-bash

GPL-3.0Shellv1.5.1

A Bash/ZSH prompt script that displays Git repository status, replicating the PowerShell posh-git experience.

GitHubGitHub
385 stars101 forks0 contributors

What is posh-git-bash?

posh-git-sh is a Bash and ZSH script that enhances terminal prompts by displaying real-time Git repository status. It shows branch information, upstream divergence, and file change counts directly in the prompt, eliminating the need to run `git status` manually. The project replicates the functionality of the Windows PowerShell posh-git module for Unix-like shells.

Target Audience

Developers using Bash or ZSH who work frequently with Git and want immediate visibility into repository status without interrupting their workflow. It's especially useful for those transitioning from PowerShell or seeking a more informative prompt.

Value Proposition

It provides a highly configurable, informative Git prompt that integrates seamlessly with existing shell setups, offering detailed status at a glance while maintaining performance and compatibility with standard Git configuration methods.

Overview

Bash/ZSH version of the posh-git command prompt

Use Cases

Best For

  • Enhancing terminal prompts with Git status for faster workflow
  • Replicating the PowerShell posh-git experience in Bash or ZSH
  • Visualizing branch divergence and file changes without extra commands
  • Customizing Git prompt behavior per repository using git config
  • Improving developer productivity with real-time repository awareness
  • Integrating Git status into existing shell themes or configurations

Not Ideal For

  • Developers using shells other than Bash or ZSH, such as Fish or tcsh
  • Large repositories where prompt responsiveness is critical and file status checks may slow down the terminal
  • Users who prefer minimalist, uncluttered prompts without detailed Git metadata
  • Teams already using comprehensive shell frameworks like oh-my-zsh with built-in Git plugins that suffice

Pros & Cons

Pros

Detailed Status Visibility

Shows branch name, upstream divergence with color coding, and counts for staged/unstaged changes, providing immediate repository awareness without extra commands, as detailed in the prompt format section.

Git Config Integration

Allows customization via git config settings per repository, such as enabling/disabling file status or stash indicators, making it flexible and easy to adjust without editing shell scripts directly.

Cross-Shell Compatibility

Works with both Bash (via PROMPT_COMMAND) and ZSH (via precmd hook), supporting a wide range of developers on Unix-like systems, as documented in the installation instructions.

Lightweight and Scriptable

It's a single shell script that integrates seamlessly into existing setups, with no external dependencies beyond Git, keeping it simple and maintainable.

Cons

Performance in Large Repos

Computing file changes can be slow in big repositories, forcing users to disable features like bash.enableFileStatus for speed, as admitted in the configuration options.

Manual Setup Complexity

Requires copying files and modifying shell configuration files (e.g., .bashrc or .zshrc), which can be error-prone for less experienced users and lacks a package manager install option.

Terminal.app Bug

Has a known issue with prompt wrapping in Terminal.app when prompts are long, due to ANSI color code handling, which limits usability on some macOS setups without workarounds.

Frequently Asked Questions

Quick Stats

Stars385
Forks101
Contributors0
Open Issues5
Last commit2 years ago
CreatedSince 2013

Tags

#hacktoberfest#command-line-tools#terminal-enhancement#shell-integration#zsh-plugin#git-prompt#developer-productivity#git-integration#bash-scripting

Built With

B
Bash
z
zsh

Included in

ZSH Plugins17.6k
Auto-fetched 1 day ago

Related Projects

zoxidezoxide

A smarter cd command. Supports all major shells.

Stars40,241
Forks941
Last commit5 days ago
zsh-autosuggestionszsh-autosuggestions

Fish-like autosuggestions for zsh

Stars36,144
Forks1,940
Last commit1 year ago
zsh-syntax-highlightingzsh-syntax-highlighting

Fish shell like syntax highlighting for Zsh.

Stars23,046
Forks1,374
Last commit13 days ago
autojumpautojump

A cd command that learns - easily navigate directories from the command line

Stars16,964
Forks707
Last commit1 year ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub