Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/git/25.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Git 如何进行特定文件的最后5次提交?_Git_Github - Fatal编程技术网

Git 如何进行特定文件的最后5次提交?

Git 如何进行特定文件的最后5次提交?,git,github,Git,Github,全部,, 我的项目中有一个文件front.js。现在,这个filefront.js最后一次提交是2bafd98be9a与其他文件的组合。下面是如何从上次提交中获取此filefront.js最后5次提交的代码,即9002040c2bf3。请尝试: $ git checkout 2bafd98be9a~5 -- front.js 这将尝试在2bafd98be9a之前获取文件5次提交*最后5次提交包含特定文件?

全部,, 我的项目中有一个文件front.js。现在,这个filefront.js最后一次提交是2bafd98be9a与其他文件的组合。下面是如何从上次提交中获取此filefront.js最后5次提交的代码,即9002040c2bf3。请尝试:

$ git checkout 2bafd98be9a~5 -- front.js 

这将尝试在2bafd98be9a之前获取文件5次提交

*最后5次提交包含特定文件?