Skip to content

Shows git branch and status if folder is a repository. Handles linebreaks in bash better and does not override prompt in a second line.

License

Notifications You must be signed in to change notification settings

hemker/gitprompt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 

Repository files navigation

Description

This simple bash script allows you to show the current branch in your prompt solely when you are in a git repository.
If you have anything modified, the branchname will be coloured red, otherwise green.
In case of any untracked files, the prompt shows a bold branchname.

Installation

Requirements: git-shell completion needs to be enabled/installed

Just copy the .bash_git to your homefolder and source it via .bashrc
You can do so with:

echo "source ~/.bash_git\n" >> ~/.bashrc 

About

Shows git branch and status if folder is a repository. Handles linebreaks in bash better and does not override prompt in a second line.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published