DEV Community

Discussion on: Productivity 101: Git Aliases for Lazy Developers

 
mojemoron profile image
Micheal Ojemoron

Wow, what does this script do?

Thread Thread
 
190245 profile image
Dave • Edited

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.