Skip to content

Instantly share code, notes, and snippets.

@mrsipan
Created October 17, 2025 15:51
Show Gist options
  • Select an option

  • Save mrsipan/815f9ab3b86a34d343b360bb6fd32883 to your computer and use it in GitHub Desktop.

Select an option

Save mrsipan/815f9ab3b86a34d343b360bb6fd32883 to your computer and use it in GitHub Desktop.
List git files
#!/usr/bin/env dash
# Ensure we're in a Git repository
if [ ! -d .git ]; then
printf "%s\n" "This is not a Git repository."
exit 1
fi
find . -type f ! -path "./.git/*" | while read -r file; do
printf "~~~~~ File: %s ~~~~~\n" $file
printf "%s\n" '```'
cat $file
printf "%s\n\n" '```'
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment