Obviously don't add it if you don't understand it (never trust a random on the internet).
But to answer your question, this:
On any terminal prompt in a git repository, I see username/hostname/path (as normal), but then the git branch (in yellow) followed by some "bit flags". In the picture, the exclamation mark tells me I have modified some file(s), the question mark tells me I've added some file(s). Just after a commit, the bit flags disappear to tell me that the working directory is "clean."
There's other flags, as described in the script. If I'm not in a git repo, I just see the normal terminal.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Since sharing is caring, I also have the branch (and some identifiers) on my terminal prompt.
.bashrc:
Wow, what does this script do?
Obviously don't add it if you don't understand it (never trust a random on the internet).
But to answer your question, this:
On any terminal prompt in a git repository, I see username/hostname/path (as normal), but then the git branch (in yellow) followed by some "bit flags". In the picture, the exclamation mark tells me I have modified some file(s), the question mark tells me I've added some file(s). Just after a commit, the bit flags disappear to tell me that the working directory is "clean."
There's other flags, as described in the script. If I'm not in a git repo, I just see the normal terminal.