Skip to content

An informative and fancy bash prompt for Git users

Notifications You must be signed in to change notification settings

ggerritsen/bash-git-prompt

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Informative git prompt for bash

A bash script that displays information about the current git location. In particular the branch name, difference with remote branch, number of files staged, changed, etc.

This script is based on the original work of magicmonty (https://github.com/magicmonty/bash-git-prompt). In this fork I dropped a lot of stuff I didn't actually need, and modified the main behaviour: instead of setting your prompt, it outputs a colored string that you can include wherever you need.

How it looks

The output of the script (included in a prompt) looks like the following:

Example prompt

The symbols are as follows:

  • ↑n : ahead of remote by n commits
  • ↓n : behind remote by n commits
  • ↓m↑n : branches diverged, remote by m commits, yours by n commits
  • ✚n : there are n staged files
  • ●n : there are n unstaged files
  • …n : there are n untracked files
  • ✖n : there are n unmerged files
  • ⚑n : there are n stash entries

About

An informative and fancy bash prompt for Git users

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Shell 100.0%