Skip to content

scottchiefbaker/perl-git-prompt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

59 Commits
 
 
 
 
 
 
 
 

Repository files navigation

perl-git-prompt

Perl script to show current Git branch and changeset status in the prompt.

Usage

Put the following in your ~/.bashrc

# Add git status to the existing bash prompt
GIT_PROMPT_PATH="$HOME/github/perl-git-prompt/git-prompt.pl"
if [[ $GIT_PROMPT_PATH != *$PS1* ]]; then
    export PS1="\$($GIT_PROMPT_PATH)"$PS1
fi

Examples:

Example Prompt

  • You are on the vader branch.
  • Your local repo is +1 commit ahead of the remote
  • There are 5 files in the staging area

Example Prompt

  • You are on the vader branch.
  • Your local repo is on the same commit as the remote
  • There are no files in the staging area

Note:

This script assumes you have 256 color terminal support. It's 2013, you should have a 256 color terminal. If you still have a 16 color terminal no guarantees how this will look.

About

Git extension for the bash prompt

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages