Reviewers: ,
Description:
Doc: CG, explain other git prompt variables
The use of these environment variables is documented within the
git source code: git/contrib/completion/git-prompt.sh
Background: in January a translator using LilyDev made a
simple mistake because he did not know the meaning of the
symbols in the git prompt:
http://lilypond-translations.3384276.n2.nabble.com/More-Catalan-translations-td7572931.html
Please review this at https://codereview.appspot.com/328890043/
Affected files (+14, -2 lines):
M Documentation/contributor/source-code.itexi
Index: Documentation/contributor/source-code.itexi
diff --git a/Documentation/contributor/source-code.itexi
b/Documentation/contributor/source-code.itexi
index
ac8ecb6ee40827b3d5f137f1baeb712ab7b52870..620368280aa9bdb63e84be05462e0dda0032da18
100644
--- a/Documentation/contributor/source-code.itexi
+++ b/Documentation/contributor/source-code.itexi
@@ -209,13 +209,25 @@ git config --global core.editor @var{nano}
@end example
Finally, and in some ways most importantly, let's make sure that
-we know what branch we're on. If you're not using LilyDev, add
-this to your @file{~/.bashrc}:
+we can easily see the state of our working copy, without the need
+of typing @code{git status} repeatedly. If you're not using
+LilyDev, add the following lines to your @file{~/.bashrc}:
@verbatim
export PS1="\u@\h \w\$(__git_ps1)$ "
+export GIT_PS1_SHOWDIRTYSTATE=true
+export GIT_PS1_SHOWUNTRACKEDFILES=true
+export GIT_PS1_SHOWUPSTREAM=auto
@end verbatim
+The first line will show the branch we're on. The other lines
+will use some symbols next to the branch name to indicate some
+kind of state. @qq{*} means that there are unstaged changes,
+@qq{+} indicates staged changes; if there are untracked files,
+a @qq{%} will appear. Finally, we can also see if our HEAD is
+behind (@qq{<}) or ahead (@qq{>}) of its upstream, and if they
+have diverged (@qq{<>}) or they are synced (@qq{=}).
+
You may need to install the additional @code{bash-completion}
package, but it is definitely worth it. After installation
you must log out, and then log back in again to enable it.
_______________________________________________
lilypond-devel mailing list
lilypond-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-devel