Live data from Hacker News

A heads up display for git

github.com

61–62 of 62 posts

Re: A heads up display for git

#61
post #59

Earlier quoted context omitted.

If you add an echo "$file" inside the while loop, what do you see? I deliberately set the .git directory to be ignored (using @ ) to avoid tons of repeating when the index.lock file is repeatedly recreated. Maybe that's what's going on here.

index.lock CREATE index.lock DELETE alternating very fast.

Agh, it's my fault.

I must have fumbled a key after pasting, as there was a dot missing; @/.git should read @./.git.

I'll add a note to the ancestor comment if I still can. Thanks and sorry!

Re: A heads up display for git

#62
post #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,…

I was missing a dot before /.git and can't edit the parent anymore… It should read

  [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;"
Sorry!
Post reply on HN