Skip to content

Instantly share code, notes, and snippets.

@gbroques
Last active August 19, 2021 00:41
Show Gist options
  • Save gbroques/6ab813236b5e7490b552465196afd5d7 to your computer and use it in GitHub Desktop.
Save gbroques/6ab813236b5e7490b552465196afd5d7 to your computer and use it in GitHub Desktop.
Watch Git Objects on Git Bash
#!/bin/bash
# https://gist.github.com/espaciomore/28e24ce4f91177c0964f4f67bb5c5fda
# https://gist.github.com/gbroques/80ec85c6557e70deb845d79c6b44fcf0
ARGS="${@}"
clear;
while(true); do
OUTPUT=$(find .git/objects -type f -printf "%T@ %Tr %p\n" | sort -n | awk '{print $2 " " $3 " " $4}' | cat --number)
clear
printf "\n"
echo -e "${OUTPUT[@]}"
sleep 2
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment