File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -166,6 +166,9 @@ GIT_PROMPT_COMMAND_FAIL="${Red}✘-_LAST_COMMAND_STATE_ " # displays as ✘-1 fo
166166 on a per repository basis by creating a file named `` .bash-git-rc `` with the
167167 content `` FETCH_REMOTE_STATUS=0 `` in the root of your git repository.
168168
169+ - You can also ignore a repository completely by creating a file named `` .bash-git-rc `` with the
170+ content `` GIT_PROMPT_IGNORE=1 `` in the root of your git repository.
171+
169172- You can get help on the git prompt with the function `` git_prompt_help `` .
170173 Examples are available with `` git_prompt_examples `` .
171174 A list of all available named colors is available with ` git_prompt_color_samples `
Original file line number Diff line number Diff line change @@ -200,11 +200,18 @@ function setGitPrompt() {
200200 FETCH_REMOTE_STATUS=0
201201 fi
202202
203+ unset GIT_PROMPT_IGNORE
204+
203205 if [[ -e " $repo /.bash-git-rc" ]]; then
204206 source " $repo /.bash-git-rc"
205207 fi
206208
207- if [ " $FETCH_REMOTE_STATUS " = 1 ]; then
209+ if [[ " $GIT_PROMPT_IGNORE " = 1 ]]; then
210+ PS1=" $EMPTY_PROMPT "
211+ return
212+ fi
213+
214+ if [[ " $FETCH_REMOTE_STATUS " = 1 ]]; then
208215 checkUpstream
209216 fi
210217
You can’t perform that action at this time.
0 commit comments