bash - Quickly detect added/removed files inside git repository -
let's have git repository .gitignore. i want 'snapshot' repository @ point in time, , save sort of digest in location outside of repository (i mustn't change repository). then, want able detect if there files added or removed (but don't care changes) inside git repository aren't in .gitignore since last snapshot. want check fast (it's editor plugin - response time crucial). if cared committed files solution trivial: store head commit hash in snapshot, , compare commits. do care uncommitted , untracked files - files not care ones in .gitignore . basically want store output of git ls-files -c -o --exclude-standard point in time, , see if changed @ later point, without processing entire output. i prefer pure git solutions, otherwise i'd cross-platform bash/batch solution.