https://github.com/raverona/git-branch-color-status
Displays the status of the current directory git branch with symbols and colors
https://github.com/raverona/git-branch-color-status
bash branch color git ps1
Last synced: 6 months ago
JSON representation
Displays the status of the current directory git branch with symbols and colors
- Host: GitHub
- URL: https://github.com/raverona/git-branch-color-status
- Owner: raverona
- Created: 2019-04-11T13:49:52.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2022-01-15T05:32:26.000Z (over 4 years ago)
- Last Synced: 2025-03-08T09:30:41.430Z (over 1 year ago)
- Topics: bash, branch, color, git, ps1
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/git-branch-color-status
- Size: 140 KB
- Stars: 0
- Watchers: 0
- Forks: 1
- Open Issues: 15
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Git Branch Color Status
version: 1.1.4
status: actively developed
## What is this?
It's a software to inform you the current state of your repository through symbols and colors
## How does it work?
It runs Bash scripts that checks the state of the git repository present on the current directory and displays it through symbols and colors
## Requirements
- [NodeJS](https://nodejs.org) and [NPM](https://www.npmjs.com/)
- [Bash](https://www.gnu.org/software/bash/)
## How to use it?
- Install it by executing `sudo npm install -g git-branch-color-status`
- Configure your PS1 on your .bashrc file like this `PS1+="\$(git-branch-color-status)";`
### Options available
| Option | Description | Type | Number of Arguments | Available Arguments | Default Value | Syntax |
|:--------:|:----------------------------------------------------------------------------:|:-------:|:--------------------:|:----------------------------:|:-------------:|:----------------------------------------------------------------------------------------------------------------------------------------|
| Version | displays the current version
number and exit | Boolean | 0 | N/A | false | -v
--version |
| Color | enable colored output | Boolean | 0 | N/A | true | -c
--color |
| No Color | disable colored output | Boolean | 0 | N/A | false | --no-c
--no-color |
| Bracket | specify the type of brackets
displayed surrounding the
branch status | String | 1 | round,
square,
curly | square | -b round
-b "round"
-b=round
-b="round"
--bracket round
--bracket "round"
--bracket=round
--bracket="round" |
### Exemples
| Command | Output |
|:------------------------------------------------:|:----------------------------------------------------------------------------------------------------------------------------------------------------------------------:|
| `git-branch-color-status` |  |
| `git-branch-color-status --no-color` |  |
| `git-branch-color-status --no-c --bracket=round` |  |
## Symbols and Colors available
### Symbols available
| Symbol | Description |
|:------:|:--------------------------------------|
| `>` | There are renamed files being tracked |
| `*` | Your branch is ahead of remote |
| `+` | There are new files being tracked |
| `?` | There are untracked files |
| `x` | There are deleted tracked files |
| `!` | There are modified tracked files |
### Colors available
| Color | Description |
|:------------------------------------------------------------------------:|---------------------------------------|
|  | Working tree clean, nothing to commit |
|  | Your branch is ahead of remote branch |
|  | Working tree not clean |
## How to contribute
Fork this project, create a branch, push your changes and make a pull request destined to the master branch