Skip to content

Instantly share code, notes, and snippets.

@scbenjamin
Last active August 29, 2015 14:03
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save scbenjamin/3081181082066037e7e4 to your computer and use it in GitHub Desktop.
command
## works in repo
git ls-tree --name-only 0.1.1 -- cms/{templates,includes}/**/*
## doesn't work outside
git --git-dir=/path/to/repo/.git --work-tree=/path/to/repo/ ls-tree --name-only 0.1.1 -- cms/{templates,includes}/**/*
## expected output (shortended)
cms/includes/js/jquery-1.11.1.min.js
cms/templates/masters/tlmd_master_default.vm
cms/templates/modules/tlmd_module_advertisement.vm
## actual output
####
#### Without filters ######
####
## cmd
git ls-tree --name-only 0.1.1
## cmd
git --git-dir=/path/to/repo/.git --work-tree=/path/to/repo/ ls-tree --name-only 0.1.1
## output for both
.gitignore
cms
design
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment