When working on a file, we often want to know who made certain changes last; we can use git blame to see details about the last modification of each line in a file. In this lesson, we show and example of using git blame to see who made the last change on a line in a file, and then we use the output of git blame to use in other tools like git log to see the full context of why the change was made and what other parts of the code base were effected at the same time as the line from git blame.

git blame getURL.js  // check who and when made the last changes to the file

Then you will get the commit id, you can use git log to see the detial and commit message:

git log <commit_id> -p

[Practical Git] Show who changed a line last with git blame的更多相关文章

  1. idea git pull fatal: bad config line 1 in file /.gitconfig 问题处理

    在网上搜好多都是直接改username和useremail的,但是没有说明原理. 因为我的电脑是新入职接手上一家的电脑 后来在git bash 里面用$ git config user.name 原来 ...

  2. Git详解之四:服务器上的Git

    服务器上的 Git 到目前为止,你应该已经学会了使用 Git 来完成日常工作.然而,如果想与他人合作,还需要一个远程的 Git 仓库.尽管技术上可以从个人的仓库里推送和拉取修改内容,但我们不鼓励这样做 ...

  3. Git以及github的使用方法(二)创建仓库,git add添加到“暂储区”,git commit添加到“本地仓库”

    什么是版本库呢?版本库又名仓库,英文名repository,你可以简单理解成一个目录,这个目录里面的所有文件都可以被Git管理起来,每个文件的修改.删除,Git都能跟踪,以便任何时刻都可以追踪历史,或 ...

  4. git --help出来的命令 + eclipse里用git小记

    用法:git [--version] [--help] [-C <path>] [-c name=value]           [--exec-path[=<path>]] ...

  5. git: fatal: Not a git repository (or any of the parent directories): .git

    在看书 FlaskWeb开发:基于Python的Web应用开发实战 时,下载完源码后 git clone https://github.com/miguelgrinberg/flasky.git 试着 ...

  6. Git版本控制管理学习笔记3-基本的Git概念

    为了更近一步的学习和理解Git的理念,这一节介绍一下Git中的一些基本概念. 基本概念 对象库图示 Git在工作时的概念 一.基本概念: 1.版本库:     Git的版本库就是一个简单的数据库,其中 ...

  7. Git / 程序员需要知道的12个Git高级命令

    众所周知,Git目前已经是分布式版本控制领域的翘楚,围绕着Git形成了完整的生态圈.学习Git,首先当然是学习Git的基本工作流.相比于SVN等传统版本控制系统来说,Git是专为分布式版本控制而生的强 ...

  8. fatal: Not a git repository (or any of the parent directories): .git

    $ git remote add origin https://github.com/heyuanchao/YouxibiClient.gitfatal: Not a git repository ( ...

  9. git plumbing 更加底层命令解析-深入理解GIT

    原文: http://rypress.com/tutorials/git/plumbing 本文详细介绍GIT Plumbing--更加底层的git命令,你将会对git在内部是如何管理和呈现一个项目r ...

随机推荐

  1. log4j学习一:解决系统日志错位问题

    这两天,开发的系统遇到了一个非常奇怪的问题,我们的前台程序会将日志时而输出到webapp.log,时而输出到其他日志文件如AlarmThreshold.log中,初看并无规律,但秉着“机器永远不会出错 ...

  2. UVa 1152 (中途相遇法) 4 Values whose Sum is 0

    题意: 要从四个数组中各选一个数,使得这四个数之和为0,求合法的方案数. 分析: 首先枚举A+B所有可能的值,排序. 然后枚举所有-C-D的值在其中用二分法查找. #include <cstdi ...

  3. NOI2003 逃学的小孩

    这一题不会做啊…… 我觉得真要比赛的话我可能会随机上几万次,然后再用LCA求距离,更新最优值,等到快超时的时候输出答案…… 题解请看2007年陈瑜希论文 代码: ; type node=record ...

  4. RMI、RPC、SOAP通信技术介绍及比对

    1.RMI 使用java的程序员,对于RMI(RemoteMethod Invoke,远程方法调用)一定不陌生,在java中,为了在分布式应用开发时,能够方便调用远程对象,java提供了RMI的API ...

  5. C# List 用法与示例

    Problem. You have questions about the List collection in the .NET Framework, which is located in the ...

  6. UVA 753 A Plug for UNIX 电器插座(最大基数匹配,网络流)

    题意: 给n个插座,m个设备(肯定要插电了),k种转换头可无限次使用(注意是单向的),问有多少设备最终是不能够插上插座的? 分析: 看起来就是设备匹配插座,所以答案不超过m.这个题适合用网络流来解. ...

  7. listview使用总结

    1. android给listview的item设定高度 原文网址:http://blog.csdn.net/l_serein/article/details/7403992 在item的layout ...

  8. 怎么学数学[How to Study Math]

  9. 反编译c#的相关问题

    最近硬盘坏掉了,有一个项目没有备份,只好用Exe 文件反编译出来用,查了一下相关的文章用到的工具如下: ILSpy_Master_2.1.0.1603_RTW_Binaries 直接生成时,有些奇怪, ...

  10. js基础第八天

    返回前面起第一个字符位置 indexOf("sdfsdf");它是从左边索引为0开始数,而且只找第一个,然后返回该字符的位置.返回是个数值.如果找不到该字符,那么就会返回-1. 返 ...