2

Possible Duplicate:
How can I search Git branches for a file or directory?

Somewhere in my local git repo, there should be a file which contains PDFCMap in the name. How can I find this file? I don't know in which branch/path it is.

[EDIT] Note that the answers in the duplicate didn't work for me.

Community
  • 1
  • 1
Aaron Digulla
  • 321,842
  • 108
  • 597
  • 820

1 Answers1

4
git rev-list --objects --all --no-walk | grep -i PDFCMap

To walk all history, drop the --no-walk option (and pipe through sort -u :))

To find out where (what branches) you can find the file:

git log --oneline  --all --no-walk --decorate -- full/path/you/obtained

e.g.:

git log --oneline  --all --no-walk --decorate -- full/path/you/obtained src/SConstruct
1fb30cf (zfs-fuse.net/testing, rudd-o/testing) fix missing split on environment CFLAG reported on gentoo by Marcin Miroslaw
fc48fe2 (sehe.nl/marcin) Takes CC en CFLAGS from the environment for scons
9bfb958 (sehe.nl/ctl) Merge branch 'ctldir' of http://rainemu.swishparty.co.uk/git/zfs into ctl
1ef5d94 (MikeHommey/build/no-ztest) Don't build nor install ztest
c5ed979 (MikeHommey/build/clean) Cleanup after scons
d6164c4 (MikeHommey/build/optim) Add an optim option to the build system
673b82c (MikeHommey/upstream/tarball) 0.5.0 release tarball
f71cca1 (tag: 0.4.0_alpha1) Doc updates. Made install_dir a command-line parameter. Adjust ARC size so that zfs-fuse shouldn't go over 100 MB of RAM.
d653bf2 (tag: 0.2.2) Automatically create symbolic links when building.
sehe
  • 374,641
  • 47
  • 450
  • 633