美文网首页Git
Git系列3:Git查看历史提交信息

Git系列3:Git查看历史提交信息

作者: XBruce | 来源:发表于2020-01-02 09:42 被阅读0次
  • 单行日志:
    git-log --oneline -2
  • 图形记录
    $ git log --oneline --graph --all
  • 91ee5aa (HEAD -> master) Merge branch 'branch1'
    |
    | * ec70678 (branch1) branch1 modify
  • | 88a0812 (origin/master) switch to master
  • | d8d9cb0 Commit log
  • | 1ecdbdd (tag: add) init commit\r\n 1) by bruce
    |/
  • 98b5721 Nothing
  • 3f289ec Add filea.txt
  • 显示指定git id的提交信息
$ git show 3f28
commit 3f289ececf67f669d74e79b4222a5bfc5d04154d
Author: Bruce Zhang <Chenggang.Zhang@Honeywell.com>
Date:   Mon Dec 23 15:21:43 2019 +0800

    Add filea.txt

diff --git a/filea.txt b/filea.txt
new file mode 100644
index 0000000..e69de29
  • 计算文件内容SHA-1: git hash-object <filename>

  • Git references: HEAD
    git show HEAD

  • 当前状态
    git status

  • git log --oneline --graph
    -git show
    git show HEAD~ #same as HEAD~1 means parent.
    git show HEAD~2 #parent's parent

  • TAG
    git tag
    git show <tag name>
    git tag <tagname> [<commit>]
    git tag xxx HEAD^ # tag the previous commit

相关文章

  • git-查看历史版本及回滚版本

    查看历史提交版本: 1.git log 查看历史所有版本信息 2.git log -x 查看最新的x个版本信息 3...

  • Git系列3:Git查看历史提交信息

    单行日志:git-log --oneline -2 图形记录$ git log --oneline --grap...

  • 二、GIT基础-查看提交历史

    3、查看提交历史 我们可以使用git log这个命令来查看提交的历史记录。默认不用任何参数,git log 会按提...

  • git回滚

    一、 git回滚到任意版本 查看历史提交的log中的版本号$ git log -3 查看最近3次提交记录 回滚到...

  • git 常用命令

    获得版本库 git init git clone​ 查看信息 git help Git log​ 查看提交日志 g...

  • 2016-07-13 Git 基础(三)

    Git 基础 - 查看提交历史 查看提交历史 git log 如果不带任何参数的话,会按照提交时间列出所有的更新。...

  • git学习总结

    git status:掌握工作时区状态 git diff:查看修改的内容 git log:查看提交历史 git r...

  • git 常用指令步骤

    git status 查看状态git log 查看提交历史git add . 跟踪所有改动过的文件git com...

  • Git 基础 - 查看提交历史

    查看提交历史 git log 命令用于查看提交历史 默认不使用参数的话,git log 会按提交时间列出所有的更新...

  • git版本控制

    查看提交历史 git log 如果想要查看git的提交历史,可以使用git log命令。本文会介绍一些常用的命令选...

网友评论

    本文标题:Git系列3:Git查看历史提交信息

    本文链接:https://www.haomeiwen.com/subject/maqqoctx.html