简体   繁体   中英

How to find a file in git?

I know that at some point I had a file in a certain path. Now, this file doesn't exist anymore. I didn't delete it from git. I'm not sure I added it? At any rate I didn't do any destructive action.

How can I find out which commit or stash this file is in?

git-log--follow选项用于查找特定文件。

git log --follow -- <filename>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM