re: Productivity 101: Git Aliases for Lazy Developers VIEW POST

re: Since sharing is caring, I also have the branch (and some identifiers) on my terminal prompt. .bashrc: function parse_git_branch() { BRANCH=...

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:
Terminal Image

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.

code of conduct - report abuse