Live data from Hacker News

A heads up display for git

github.com

1–10 of 62 posts

Re: A heads up display for git

#5
Consider sending these changes upstream to contrib/completion/git-prompt.sh in git.git. It already has a lot of toggles for adjusting the prompt. These things you've added could be added as options.

Re: A heads up display for git

#8
post #4

https://github.com/dahlbyk/posh-git has had something similar for awhile - very useful!

Push Git is great! I've been looking for a comparable solution for *nix for a while. Zsh's git completion/prompt just showing the branch and dirty state isn't enough.

Re: A heads up display for git

#9
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.

Re: A heads up display for git

#10
post #2

Looks very promising! Thanks, we really missed something like this in Git.

I find the ZSH git extension to work very well.

Is that configurable? That is to say, can I change what's printed to the prompt to add more info like # of files added/removed/modified? I looked into it a little bit it looked hard-coded.
Post reply on HN