可能重複:
How can I search Git branches for a file or directory?找到文件中的git回購
某處在我的本地git倉庫,那裏應該是包含在名稱PDFCMap
文件。我怎樣才能找到這個文件?我不知道它是哪個分支/路徑。
[編輯]請注意,副本中的答案不適用於我。
可能重複:
How can I search Git branches for a file or directory?找到文件中的git回購
某處在我的本地git倉庫,那裏應該是包含在名稱PDFCMap
文件。我怎樣才能找到這個文件?我不知道它是哪個分支/路徑。
[編輯]請注意,副本中的答案不適用於我。
git rev-list --objects --all --no-walk | grep -i PDFCMap
走路的所有歷史,刪除--no步行選項(通過sort -u
和管道:))
找出(什麼分支),你可以找到該文件:
git log --oneline --all --no-walk --decorate -- full/path/you/obtained
如:
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
'git的log'返回任何內容,我不知道在哪個分支/修訂的文件。 –