赞
踩
git-show - 命令用于显示各种类型的对象
git show [<options>] [<object>…]
显示一个或多个对象(blobs
,树,标签和提交)。
对于提交,它显示日志消息和文本差异。 它还以git diff-tree --cc
生成的特殊格式呈现合并的提交。
对于标签,它显示标签消息和引用对象。
对于树,它显示的名称(相当于使用git ls-tree
和--name-only
选项)。
对于简单的blobs
,它显示了普通的内容。
该命令可以使用适用于git diff
命令的选项(如–pretty/–format)来控制如何显示提交引入的更改。
<object>…
The names of objects to show (defaults to HEAD).
--pretty[=<format>]
--format=<format>
下面是pretty内建的一些格式
<hash> <title line>
This is designed to be as compact as possible.
commit <hash>
Author: <author>
commit <hash>
Author: <author>
Date: <author date>
<title line>
<full commit message>
commit <hash>
Author: <author>
Commit: <committer>
<title line>
<full commit message>
commit <hash>
Author: <author>
AuthorDate: <author date>
Commit: <committer>
CommitDate: <committer date>
<title line>
<full commit message>
git show [commit_id] 查看某次历史提交信息的完整信息
git show [commit_id]:fileName 查看某次commit中某个文件的内容
git show HEAD查看HEAD标签当前指向的提交的完整信息
git show HEAD:fileName 查看HEAD标签当前指向的提交的文件内容
git show master 查看master分支最新一次提交的完整信息
git show master^或git show master~ 查看master分支最新一次提交的父提交的完整信息
git show master^2查看master分支最新一次提交的第二个父提交(也就是父提交的父提交)的完整信息
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。