Git:看我最后一次提交 [英] Git: See my last commit

查看:237
本文介绍了Git:看我最后一次提交的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我只想看到上次提交时提交的文件,就像我在执行 git commit 时看到的那样。不幸的是搜索

  gitlast commitlog 

谷歌中的

让我无处可去。和

  git diff HEAD ^ .. HEAD 

并不是我所需要的,当然,因为它也会带来变化的大胆。

通过评论确定,看来OP正在寻找

  $ git log --name-status HEAD ^ .. HEAD 

这也非常接近您从 svn status svn log -v ,很多人从subversion转到git都很熟悉。



- name-status 是这里的关键;正如本问题中的其他人所指出的那样,您可以使用 git log -1 git show git diff 来获得相同的输出。我个人倾向于在查看单个修订时使用 git show< rev>


I just want to see the files that were committed in the last commit exactly as I saw the list when I did git commit. Unfortunately searching for

git "last commit" log

in Google gets me nowhere. And

git diff HEAD^..HEAD

is not what I need, of course, since it spews the guts of the change too.

解决方案

As determined via comments, it appears that the OP is looking for

$ git log --name-status HEAD^..HEAD

This is also very close to the output you'd get from svn status or svn log -v, which many people coming from subversion to git are familiar with.

--name-status is the key here; as noted by other folks in this question, you can use git log -1, git show, and git diff to get the same sort of output. Personally, I tend to use git show <rev> when looking at individual revisions.

这篇关于Git:看我最后一次提交的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆