Merge branch 'master' of https://github.com/aks/bash-git-prompt into aks-master
commit
b9855cd627
@ -0,0 +1,13 @@ |
||||
# These are the color definitions used by gitprompt.sh |
||||
GIT_PROMPT_PREFIX="[" # start of the git info string |
||||
GIT_PROMPT_SUFFIX="]" # the end of the git info string |
||||
GIT_PROMPT_SEPARATOR="|" # separates each item |
||||
|
||||
GIT_PROMPT_BRANCH="${Magenta}" # the git branch that is active in the current directory |
||||
GIT_PROMPT_STAGED="${Red}●" # the number of staged files/directories |
||||
GIT_PROMPT_CONFLICTS="${Red}✖" # the number of files in conflict |
||||
GIT_PROMPT_CHANGED="${Blue}✚" # the number of changed files |
||||
GIT_PROMPT_REMOTE=" " # the remote branch name (if any) |
||||
GIT_PROMPT_UNTRACKED="${Cyan}…" # the number of untracked files/dirs |
||||
GIT_PROMPT_STASHED="${BoldBlue}⚑" # the number of stashed files/dir |
||||
GIT_PROMPT_CLEAN="${BoldGreen}✔" # a colored flag indicating a "clean" repo |
||||
@ -0,0 +1,56 @@ |
||||
#!/bin/bash |
||||
# git-prompt-help -- show useful info to help new users with the information |
||||
# being displayed. |
||||
|
||||
git_prompt_help() { |
||||
cat <<EOF 1>&2 |
||||
The git prompt format is [<BRANCH><TRACKING>|<LOCALSTATUS>] |
||||
|
||||
BRANCH is a branch name, such as "master" or "stage", a tag name, or commit |
||||
hash prefixed with ':'. |
||||
|
||||
TRACKING indicates how the local branch differs from the |
||||
remote branch. It can be empty, or one of: |
||||
|
||||
↑N - ahead of remote by N commits |
||||
↓N - behind remote by N commits |
||||
↓M↑N - branches diverged, other by M commits, yours by N commits |
||||
|
||||
LOCALSTATUS is one of the following: |
||||
|
||||
✔ - repository clean |
||||
●N - N staged files |
||||
✖N - N unmerged files |
||||
✚N - N changed but *unstaged* files |
||||
…N - N untracked files |
||||
⚑N - N stash entries |
||||
|
||||
See "git_prompt_examples" for examples. |
||||
EOF |
||||
} |
||||
help_git_prompt() { git_prompt_help ; } |
||||
|
||||
git_prompt_examples() { |
||||
cat <<EOF 1>&2 |
||||
These are examples of the git prompt: |
||||
|
||||
(master↑3|✚1) - on branch "master", ahead of remote by 3 commits, 1 |
||||
file changed but not staged |
||||
|
||||
(status|●2) - on branch "status", 2 files staged |
||||
|
||||
(master|✚7…) - on branch "master", 7 files changed, some files untracked |
||||
|
||||
(master|✖2✚3) - on branch "master", 2 conflicts, 3 files changed |
||||
|
||||
(master|⚑2) - on branch "master", 2 stash entries |
||||
|
||||
(experimental↓2↑3|✔) - on branch "experimental"; your branch has diverged |
||||
by 3 commits, remote by 2 commits; the repository is |
||||
otherwise clean |
||||
|
||||
(:70c2952|✔) - not on any branch; parent commit has hash "70c2952"; the |
||||
repository is otherwise clean |
||||
EOF |
||||
} |
||||
|
||||
Loading…
Reference in new issue