https://github.com/fizzygalacticus/git-in-bash-prompt
Show git branch and statuses in your bash prompt.
https://github.com/fizzygalacticus/git-in-bash-prompt
Last synced: 27 days ago
JSON representation
Show git branch and statuses in your bash prompt.
- Host: GitHub
- URL: https://github.com/fizzygalacticus/git-in-bash-prompt
- Owner: FizzyGalacticus
- Created: 2017-02-28T21:02:00.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-02-28T21:04:14.000Z (over 9 years ago)
- Last Synced: 2026-03-06T10:11:22.294Z (4 months ago)
- Language: Shell
- Size: 1000 Bytes
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Show Git Information In Bash Prompt
The snippet found here in the ```.bashrc``` file, when added to your own, will show the current git branch as well as any statuses available.
With no statuses:
```bash
user@host:~/path/to/git/repo {bit-branch-name}$
```
When there has been a change to a file:
```bash
user@host:~/path/to/git/repo {bit-branch-name !}$
```
When there are untracked files in the repo:
```bash
user@host:~/path/to/git/repo {bit-branch-name ?}$
```
When there are both changes and untracked files:
```bash
user@host:~/path/to/git/repo {bit-branch-name !?}$
```
Try it out!