Skip to content

Instantly share code, notes, and snippets.

@aparkerlue
Created December 17, 2021 16:57
Show Gist options
  • Save aparkerlue/cd581f36b2b87fd00f57562dbf6f32b8 to your computer and use it in GitHub Desktop.
Save aparkerlue/cd581f36b2b87fd00f57562dbf6f32b8 to your computer and use it in GitHub Desktop.
Bash function to list Git index and working tree files in a tree-like format
# -*- mode: shell-script; sh-shell: bash; coding: utf-8; -*-
git-tree-files() {
git ls-files "$@" | tree -a --fromfile .
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment