I clone my source using git clone https://gerrit.wikimedia.org/r/p/mediawiki/core.git w/
. Then I specify a specific branch/tag by doing git checkout
If you use the bash shell, you can use __git_ps1 in your bash prompt to show this, for example:
[me@myhost:~/code/myproject] (master)$ ls
Download git-completion.bash to ~/.git-completion.bash
Then in your ~/.bashrc
file, add
source ~/.git-completion.bash
Then set your PS1
value to something including $(__git_ps1 "(%s)")
, something like:
PS1="[\u@\h:\w]\$(__git_ps1)\\$ "