2

How can I find all files (lets say symlinks) ever added to the git repo?

git ls-tree -r master

outputs only for one branch and not in the whole history... (the first column contains the mode, which is 12000 for a link)

I want to search them and then filter them with git filter-branch

Gabriel
  • 8,990
  • 6
  • 57
  • 101
  • Possible duplicate of [Can I use Git to search for matching filenames in a repository?](http://stackoverflow.com/questions/277546/can-i-use-git-to-search-for-matching-filenames-in-a-repository) – Daniel Mar 24 '16 at 15:20

1 Answers1

0

By running a tree-filter which extracts for each commit all files and checks for the 12000 in the output:

git filter-branch --tree-filter $'git ls-files --stage | sed -e \'/12000/!d\' --all | cut -f 2'

The command does not change files and therefore does not rewrite the history. I am not sure about this (could somebody assure that?)

Gabriel
  • 8,990
  • 6
  • 57
  • 101