博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
[Git] Git 常用技巧
阅读量:6888 次
发布时间:2019-06-27

本文共 397 字,大约阅读时间需要 1 分钟。

版本对比

1. 对比两个 COMMIT

git diff <commit> <commit>

2. 对比 COMMIT 和父 COMMIT

git diff <commit^>git diff-tree -p <commit>

3. 只显示某一个 commit 修改过的文件名称

git diff-tree --no-commit-id --name-only -r <commit>

示例:

$ git diff-tree --no-commit-id --name-only -r HEADsrc/packer/GitMessenger.javasrc/packer/PackerModule.java

4. 签出单个文件

git checkout 
path/to/the/filegit checkout
path/to/the/file

转载地址:http://tqtbl.baihongyu.com/

你可能感兴趣的文章
小波变化库——Pywalvets学习笔记
查看>>
y - 1,一个 缝隙,
查看>>
2维矩阵前缀和技巧题目
查看>>
关于git的一些操作
查看>>
[原]RobotFrameWork(四)变量运算与Evaluate
查看>>
心态决定命运_no excuses, suck it up, obey your teacher
查看>>
【HDOJ】2371 Decode the Strings
查看>>
【HDOJ】1818 It's not a Bug, It's a Feature!
查看>>
java环境变量
查看>>
180510.最近踩过和听过的sql的坑
查看>>
Centos提示-bash: make: command not found的解决办法
查看>>
FastSocket学习笔记~RPC的思想,面向对象的灵活
查看>>
TCP连接探测中的Keepalive 和心跳包
查看>>
2015第5周三网摘
查看>>
C#系列教程——对一个对象的装箱取消转换
查看>>
RTP协议分析
查看>>
簡單SQL存儲過程實例
查看>>
有效沟通:听懂话,才能回答(转)
查看>>
整理的代码规范
查看>>
JStorm-介绍
查看>>