yeah, I understand the angle you are coming from. Uncoupling git aliases from the shell environment is a better way to go, thanks for the feedback. Nice git aliases :)
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.
yeah, I understand the angle you are coming from. Uncoupling git aliases from the shell environment is a better way to go, thanks for the feedback. Nice git aliases :)
My full .gitconfig (sanitised), if you're interested. Steal/borrow whatever you feel might be useful.
pastebin.com/wPavbDnJ
(and yes, my Bash Aliases has "g=git", so I can do things like
g acp "commit msg"
)Lol 😂 Nicee! I will borrow some 😉
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.