|
|
|
|
|
by an_ko
3944 days ago
|
|
I use a modified version of mislav's git prompt https://gist.github.com/mislav/1712320 which is pretty minimal but usually enough for me. For when I have to wrangle lots of files at once (like during interactive rebase to clean up history before push) I have a git watch alias that shows a high-level overview of changes that refreshes with inotify: [alias]
watch = "!clear;inotifywait --quiet -mr -e modify,move,create,delete --format \"%f %e\" @/.git . | \
while read file; do \
clear;\
git status --short;\
git --no-pager diff --shortstat;\
done;"
I leave that running in a visible terminal window. It's more verbose than a prompt and reduces the need for constant git status sanity-checking. Maybe useful for someone. |
|
I like my git prompt to show me my branch name, colored with grey (no changes), red (unsaved changes), or green (staged changes), with the depth of the branch, e.g.:
My prompt is based on: https://gist.github.com/tobiassjosten/828432... but I've made slight modifications:
and, at the end of `git_prompt`: