git 中查看某个文件是什么时候被删除的
如题:查看哪个commit删除了指定文件说明:使用 git log – file# see the changes of a file, works even# if the file was deletedgit log -- [file_path]# limit the output of Git log to the# last commit, i.e. the commit w
·
如题:查看哪个commit删除了指定文件
说明:使用 git log – file
# see the changes of a file, works even
# if the file was deleted
git log -- [file_path]
# limit the output of Git log to the
# last commit, i.e. the commit which delete the file
# -1 to see only the last commit
# use 2 to see the last 2 commits etc
git log -1 -- [file_path]
# include stat parameter to see
# some statics, e.g., how many files were
# deleted
git log -1 --stat -- [file_path]
参考:http://www.vogella.com/tutorials/Git/article.html#retrievefiles_finddeletedfile
已为社区贡献1条内容
所有评论(0)