Git: display current branch in Bash
To show the current Git branch in Bash, e.g.:
Append this to ~/.bashrc
:1
Then either run source ~/.bashrc
or reopen the shell to apply the changes.
Taken from this earlier note, which in turn took this snippet from here. Thanks danielalvarenga and abdobouna. ↩︎