Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/git/21.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版本列表与git show相结合_Git_Show_Git Rev List - Fatal编程技术网

将git版本列表与git show相结合

将git版本列表与git show相结合,git,show,git-rev-list,Git,Show,Git Rev List,目前,要查看分支机构上的提交,我需要执行以下操作: git merge-base HEAD master # to get the hash of when the branch came off parent git show [hash from above command]..my-branch 但是,这会按相反的时间顺序列出提交。我想回顾一下从第一次开始到最近一次结束的提交。要按此顺序获取提交哈希,可以使用 git rev-list [hash from above command]

目前,要查看分支机构上的提交,我需要执行以下操作:

git merge-base HEAD master  # to get the hash of when the branch came off parent
git show [hash from above command]..my-branch
但是,这会按相反的时间顺序列出提交。我想回顾一下从第一次开始到最近一次结束的提交。要按此顺序获取提交哈希,可以使用

git rev-list [hash from above command]..my-branch

但是,有谁能告诉我如何将此传递给show或difftool吗?

我认为您想要的实际上可以直接从git log中获得

    git log -p --reverse [hash from above command]..my-branch