git使用记录六:对commit的message做处理
修改最新commit的message
git commit --amend
修改老旧commit的message
查询最新的三个log
soaeon@DESKTOP-FUJJTHR MINGW64 /f/gitstudy (master)
$ git log -n 3
commit 88400d127d5f33df816657cf5765d8e9563c9b88 (HEAD -> master)
Author: soaoen <soaeon@163.com>
Date: Wed May 22 20:28:29 2019 +0800
update readme.md
commit 2f3daee92d677983df1b30df5ccd9608d6053051
Author: soaoen <soaeon@163.com>
Date: Wed May 22 20:27:18 2019 +0800
rename
commit f51147967743aec46e111a7753cc9a6b7bde9384
Author: soaoen <soaeon@163.com>
Date: Wed May 22 20:26:36 2019 +0800
add readme
如果我们要修改32f575d33 这个log的message.,那么要基于它的parent(980e3beda)做查询
git rebase -i f511479
执行之后显示的数据如下:
r 2f3daee rename for readme.md
pick 88400d1 update readme.md
修改完成之后查询log
$ git log -n 3
commit 45c5445ae8fca52276f9ffca685c968f29066c8f (HEAD -> master)
Author: soaoen <soaeon@163.com>
Date: Wed May 22 20:28:29 2019 +0800
update readme.md
commit 98e4419eb04aa3ef95e6916948b37b14d67262cc
Author: soaoen <soaeon@163.com>
Date: Wed May 22 20:27:18 2019 +0800
rename
reword 7cc45c7 rename for readme.md
commit f51147967743aec46e111a7753cc9a6b7bde9384
Author: soaoen <soaeon@163.com>
Date: Wed May 22 20:26:36 2019 +0800
add readme
发现log:rename 改成了 reword 7cc45c7 rename for readme.md
git使用记录六:对commit的message做处理的更多相关文章
- 【Git】Git使用记录: 撤回已经commit到本地的提交记录
话不多说直接上步骤: git bash直接干到你的code. 直接敲命令: git reset --soft HEAD~1 搞定 就是这么简单粗暴. 如有顾虑请自行找个案例测试即可. 参考资料 htt ...
- Git 修改历史提交信息 commit message
修改最近一条提交的消息 git commit --amend 进入vim模式 按字母 o 或者 insert键 开始修改内容 按 esc 推出编辑,最常用的是输入":q"直接退出, ...
- git commit时message的问题
1: 在执行git commit的时候,有两种办法为该commit添加message信息一种是git commit -m 'your message'另一种是git commit会打开commit-e ...
- git修改已经push的commit message
git中修改上一次提交的commit的message git commit --amend -m "你的新的注释" git push -f 多个commit https://www ...
- Git学习记录 力做全网最强入门教程
目录 Git学习记录 力做全网最强入门教程 什么是GitHub? 什么是Git? Git的配置 Git的安装(只介绍windos操作系统下) Git的配置 至此我们的入门教程到此结束,更新中级教程要等 ...
- Git: 教你如何在Commit时有话可说
Git: 教你如何在Commit时有话可说 不知道大家有没有观察过那些在Github上Star数位居前列的项目,它们无一例外的都拥有完善的文档体系和高覆盖的测试用例.要做到完善没有规范肯定是不行的 ...
- [转] git merge 将多个commit合并为一条之--squash 选项
[FROM] https://blog.csdn.net/themagickeyjianan/article/details/80333645 1.一般的做法(直接git merge) Git相对于C ...
- git笔记记录
廖雪峰Git教程学习记录. 0.常用命令总结: pwd 命令用于显示当前目录 git init 命令把这个目录(自己建的文件夹)变成Git可以管理的仓库(必须切换到当前文件夹下面执行这个命令) ls ...
- git 学习记录—— git 中的仓库、文件状态、修改和提交操作等
最近开始学习使用版本控制工具 git .学习方式主要通过阅读 git 网站上的 Pro git 和动手实践,使用的系统为 Ubuntu16.04LTS,以及 Windows 8.1. 本文主要关注 ...
随机推荐
- ping局域网主机得到外网IP或另一网段IP
症状::两个笔记本连接到同一个路由器上, 一个ip是 192.168.1.100,主机名是Lenovo-A, 另一个是192.168.1.109,主机名是Lenovo-B 在Lenovo-A 上pin ...
- bat ini文件读取
借助<bat 读取 ini 文件>文章中的readini.bat实现(请自行前往下载),可满足多个section下Key值查询. ini文件示例 [Server] ServerName = ...
- Linux笔记1-简介
以下为观看兄弟连视频教程所记. 1.简介 1965年,MIT.GE.AT&T的贝尔实验室 --> Multics 分时.庞大 1969年,贝尔实验室的肯·汤普森 --> Unix ...
- 20180209-xml模块
xml的用法操作如下: xml格式如下: <?xml version="1.0"?> <data> <country name="Liech ...
- presentingViewController、presentedViewController区别
解释两个属性:presentingViewController 和 presentedViewController A----(present)-----B----(present)-----C 1. ...
- 07.Linux-CentOS系统库文件libaudit.so.1丢失问题
问题:缺少共享库文件sudo: error while loading shared libraries: libaudit.so.1: cannot open shared object file: ...
- htmlunit填坑
htmlunit 无头浏览器 爬虫使用填坑: <!-- htmlunit start --> <dependency> <groupId>org.jsoup< ...
- html5 lineTo的使用例子
demo.js function draw(id) { var CANVAS=document.getElementById(id); var context=CANVAS.getContext('2 ...
- github ssh秘钥配置
1.本地生产ssh密钥对 ssh-keygen -t rsa -C "your_email@example.com" 2. 进入~/.ssh 拷贝公钥进入github里面
- 报错——userdel: user hhh is currently used by process 9218
报错 userdel: user hhh is currently used by process 9218 [root@centos71 ~]# useradd hhh [root@centos71 ...