git实战-2、gitk使用

文章目录

  • git实战-2、gitk使用
  • 前言
  • gitk可视化页面说明
    • git操作和gitk视图变化
      • git branch dev
      • git checkout dev
      • git commit -am"test commit"
      • git merge dev
      • git branch -d dev
  • git选项说明

前言

gitk官方介绍:
https://git-scm.com/docs/gitk

概念:显示存储库或选定提交点的更改信息。这包括可视化commit图,显示与每个commit相关的信息,以及每个修订的树中的文件。

使用git客户端,试图理解git世界中checkout,commit,branch,remote,rebase等术语

在window客户端进入到git仓库,使用命令打开gitk工具窗:

gitk --all

gitk可视化页面说明

说明信息:

  1. 左上方窗格显示了此存储库的一系列提交,其中最新的提交位于顶部。
  2. 右边窗格显示所选提交的用户信息和提交时间
  3. 所选提交的message
  4. 名为“master”的本地分支,它指向最近的提交
  5. 远程引用分支,远程存储库的名为“origin”的“master”分支,指向最近的提交。
  6. 黄点表示上次提交点HEAD、红色表示本地还存在未add的文件、绿色表示本地改变的文件已经add,但是还没有提交、蓝色表示已经提交的记录
  7. 所选提交的详情,author:作者,commiter:提交者,Parent:上次提交的SHA ID,child:下次提交的SHA ID,branch所提交的分支,follows:跟进者,precedes:领先
  8. 提交的提交SHA ID(唯一标识符,类似于subversion修订号)
  9. 本次提交变化的文件
    10、提交文件的基本信息

git操作和gitk视图变化

新建dev分支,F5刷新gitk工具,视图刷新,我们可以进行一些git常规操作,去F5刷新对应gitk视图,进行可视化的查看git status

git branch dev

git checkout dev

git commit -am"test commit"

查看gitk,出现dev黄色提交点,说当前库指向了新的分支ddev。

切回去master库,git checkout master

git merge dev

git branch -d dev

给test_commit2 创建一个标签 2.31

git选项说明

摘自:https://git-scm.com/docs/gitk

–all
Show all refs (branches, tags, etc.).

–branches[=]
–tags[=]
–remotes[=]
Pretend as if all the branches (tags, remote branches, resp.) are listed on the command line as . If is given, limit refs to ones matching given shell glob. If pattern lacks ?, , or [, / at the end is implied.

–since=
Show commits more recent than a specific date.

–until=
Show commits older than a specific date.

–date-order
Sort commits by date when possible.

–merge
After an attempt to merge stops with conflicts, show the commits on the history between two branches (i.e. the HEAD and the MERGE_HEAD) that modify the conflicted files and do not exist on all the heads being merged.

–left-right
Mark which side of a symmetric difference a commit is reachable from. Commits from the left side are prefixed with a < symbol and those from the right with a > symbol.

–full-history
When filtering history with …​, does not prune some history. (See “History simplification” in git-log[1] for a more detailed explanation.)

–simplify-merges
Additional option to --full-history to remove some needless merges from the resulting history, as there are no selected commits contributing to this merge. (See “History simplification” in git-log[1] for a more detailed explanation.)

–ancestry-path
When given a range of commits to display (e.g. commit1…commit2 or commit2 ^commit1), only display commits that exist directly on the ancestry chain between the commit1 and commit2, i.e. commits that are both descendants of commit1, and ancestors of commit2. (See “History simplification” in git-log[1] for a more detailed explanation.)

-L,:
-L::
Trace the evolution of the line range given by “,” (or the function name regex ) within the . You may not give any pathspec limiters. This is currently limited to a walk starting from a single revision, i.e., you may only give zero or one positive revision arguments. You can specify this option more than once.

git实战-2、gitk使用相关推荐

  1. Git实战(二)原理

            上次的博文Git实战(一)版本号控制概述中我们简介了一下版本号控制系统的概念,重点对版本号控制的三种类型进行了分析和对照,从本篇博文開始我们进入Git的世界,首先介绍一下Git实现版本 ...

  2. Git实战技巧-多人协作开发出现代码冲突,如何合并代码

    Git实战技巧-多人协作开发出现代码冲突,如何合并代码 1.企业场景 小智和小黑两个人交叉修改同一个文件,这个时候小智修改完提交.问题来了,如果小智提交成功,那么就相当于忽略了小黑提交的内容.这个时候 ...

  3. Git实战技巧-比较不同分支之间的差异和代码的改动

    Git实战技巧-比较不同分支之间的差异和代码的改动 1.企业场景 播仔即将结束在传智公司的开发工作,跳槽到黑马公司.项目经理考虑到播仔即将离职,只分配了一个简单的账户密码登录功能,而其他方式的登录功能 ...

  4. Git实战之git客户端上传文件到github

    Git实战之git客户端上传文件到github 一.Git介绍 1.Git简介 2.版本控制系统的分类 二.检查本地系统版本 三.windows安装Git客户端 1.进入windows的powersh ...

  5. Git实战(四)| Git分支管理实操,搞定在线合并和本地合并

    类似于SVN这种集中式版本管理,三年前刚来上海工作时候,在华为驻场上班,华为用的就是SVN,印象最深的就是那个小乌龟的图标:后来到外面工作,渐渐发现用Git的非常多,慢慢学习了解发现Git这种分布式的 ...

  6. 面向新手的git实战教程

    嗨!我是团子,大家好久不见呀~ 记得之前在网上学习git相关知识时,看到的文章大部分都是讲解git的基本命令有哪些,用处是什么,但是自己真正上手使用git时,仍然无从下手. 所以今天就想从初始化一个g ...

  7. Win7环境下Cygwin中Git可视化配置(gitk配置)

    我们知道cygwin可以在windows系统中模拟linux开发环境,自然我们也就能够在其中配置git,配置git的教程很多了,网上一搜一大把,这里给一篇吧(不一定保证对),童鞋们可以去看看这篇Win ...

  8. 解决Git中打开gitk图形界面时中文部分乱码

    解决Git中打开gitk图形界面时中文部分乱码 gitri图形日志gitk打开时,看到中文时乱码,不用着急按照下面方法立刻解决! 分析:这大部分是因为编码格式的问题,建议使用utf-8 without ...

  9. Git实战:branch分支操作详解

    什么是分支 分支是指在主干道上分支的支线,可以前往不同的地方,也可以到达相同的终点(只是实现的路线不同).Git指向团队开发中的个体,各开发者可以有自己的分支,开发时不会影响其他分支的开发进度.分支完 ...

最新文章

  1. RStudio启动后修改文件(数据)读取默认目录
  2. C++_泛型编程与标准库(六)
  3. vscode 注释_VSCode最强助攻
  4. UI组件之AdapterView及其子类(二)GridView网格视图的使用
  5. c++ opencv实现区域填充_帮你解锁一个新技能,opencv完美媲美PS,图片PS,我们代码实现...
  6. [渝粤教育] 中国地质大学 工业通风及除尘 复习题
  7. Validator 使用总结
  8. 复选框怎么点td选中_jQuery点击tr实现checkbox选中的方法
  9. MyBatis JdbcType介绍
  10. 欢迎加入唐山.NET俱乐部
  11. python-标识符与变量-标识符的命名规范
  12. 信息量、熵、相对熵与交叉熵的理解
  13. SG 函数初步 HDU 1536 amp;amp; HDU 1944
  14. 基于企业微信和钉钉的工资条发送工具 - 工资条帮
  15. ios yytext的使html,iOS 利用YYText 实现 展开全文 功能
  16. fiddler手机模拟器抓包_fiddler抓取手机模拟器数据
  17. 2022茶艺师(初级)操作证考试题库及在线模拟考试
  18. hdmi tv 的edid_HDMI之EDID分析
  19. 在树莓派中Linux环境下rpm包的安装
  20. 安装vs2013出现此预许可证已过期--解决办法

热门文章

  1. pytorch实现GoogLeNet
  2. [转].NET 数据访问架构指南
  3. 向日葵win10远程linux主机,快速解答win10系统使用向日葵远程桌面软件远程的具体办法...
  4. 解决WIN7SP1与NOD32环境下载速度缓慢
  5. POI 读取word (word 2003 和 word 2007
  6. 从业务分析到系统建模、研发 基本方法论
  7. JavaWeb复习——task04:JavaBean 动作标签和作用域
  8. linux增删查改语句,mysql基础知识之增删查改使用介绍
  9. Android自定义控件系列(1):选项控件
  10. 时薪20K的高级程序猿教你如何用Python一步步来搭建一个区块链