Git status in your BASH prompt
I'm a command line git user. I do 99% of my git related stuff without a GUI. I know the world is split about 50/50 between GUI users and command line users. But if you are like me, you'll love this post.
Anytime you go to do any command with git, you'll start with git status. You have to know what branch you are one and what the local state of your repo is. I've been using bash-git-prompt for a while to provide this info without needing to type anything. You can check out the project here: https://github.com/magicmonty/bash-git-prompt
Installing
Installation is dead simple:
[Code block]
Then add this to your ~/.bash_profile:
[Code block]
My customizations
I'm not a huge fan of the default settings. So I added a few customizations to my setup. I disabled remote fetching to speed up the prompt. I prefer a single line for my prompt. I use stashes for work in progress code so I don't want my stash count included in the prompt.
Customizations added in ~/.bash_profile
[Code block]
This leaves my prompt looking like: [Image: Screen-Shot-2017-03-22-at-5.54.21-PM.png]
Read the original post with all embeds and interactive content at https://rants.broonix.ca/git-status-in-your-bash-prompt/
Discussion in the ATmosphere