4 ms·
Slightly related, I get a lot of value out of a bash prompt which tells me: - if my git repo is dirty (uncommitted changes) - which branch it is on - if (and
by jbert 12y ago
Slightly related, I get a lot of value out of a bash prompt which tells me:
- if my git repo is dirty (uncommitted changes)
- which branch it is on
- if (and how many) changes I have stashed
It's not originally my work but I find it massively useful, since it avoids the "committed but not pushed" failure mode, the "on wrong branch" failure more and the "stashed and forgotten about" failure mode.
I know that regularly running git status would work, but this is a useful visual reminder for me.
- chris_wot 12y agoLink to bashism that allows this?
- zorbo 12y agohttp://lmgtfy.com/?q=git+bash+integration http://lmgtfy.com/?q=git+bash+integration
- chris_wot 12y agohttp://lmgtfy.com/?q=noone+likes+a+smartarse http://lmgtfy.com/?q=noone+likes+a+smartarse
- deleted 12y ago[deleted]
- jbert 12y agoI use this http://pastebin.com/HDJvD3GC http://pastebin.com/HDJvD3GC which as I say isn't my own work (although I've tweaked it a bit). It depends on some git output strings, so is theoretically fragile but in practice has been stable over a few years of git updates.
- ccozan 12y agoAn actual solution is here : https://coderwall.com/p/fz0e0g https://coderwall.com/p/fz0e0g . Alternatively, look into the /etc/bash_completion.d/git file, you can use many funcs in there. Extend it at will.