Pierre-Yves Barriat 7 rokov pred
rodič
commit
99f02d1239
1 zmenil súbory, kde vykonal 13 pridanie a 1 odobranie
  1. 13 1
      README.md

+ 13 - 1
README.md

@@ -74,7 +74,19 @@ If you use the Bash shell, Git comes with a nice auto-completion script you can
  ```
 source ~/git-completion.bash
  ```
- 
+
+In the same time, the following script allows you to see repository status in your prompt. Download it directly from the Git source code at https://github.com/git/git/blob/master/contrib/completion/git-prompt.sh. Copy this file to your home directory, and add this to your ```.bashrc``` file:
+ ```
+source ~/git-prompt.sh
+ ```
+
+Finally, change your PS1 to call `__git_ps1` as `command-substitution`:
+
+ ```
+PS1='[\u@\h \W$(__git_ps1 " (%s)")]\$ '
+```
+
+
 #### git-config
 
 Tell Git which whitespace problems it should recognize, namely any whitespace at the end of a line, as well as mixed spaces and tabs: