Skip to content

Bash prompt for giving detail information about status of current git repository.

License

Notifications You must be signed in to change notification settings

m-wrona/git-bash-prompt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

git-bash-prompt

Bash prompt for giving detail information about status of current git repository.
Script extends PS1 variable preserving user's settings.

Description

Script distinguishes two states:

  • clean repository (no changes found): ({branch} ✔)
  • repository where changes are found: ({branch},↑ {nr},↓ {nr},✚ {nr},● {nr},✖ {nr},? {nr},⚑ {nr})

where:

  • {branch}: name of the current branch
  • ↑: local branch is ahead of origin branch
  • ↓: local branch is behind origin branch
  • ✚: added files
  • ●: modified or renamed files
  • ✖: removed files
  • ?: untracked files
  • ⚑: number of stashed changes
  • {nr}: number of changes

Script displays only information about found changes thus empy statuses are skipped ({nr}=0).

Samples

  • michal@wrona:~/git-bash-prompt(master ✔)$
  • michal@wrona:~/git-bash-prompt(feature-branch,↓ 1, ✚ 3, ● 8, ✖ 2)$
  • michal@wrona:~/git-bash-prompt(other-branch, ⚑ 1)$

Installation

  1. git clone {repository}
  2. cd {repository}
  3. $source install.sh

About

Bash prompt for giving detail information about status of current git repository.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages