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. 本文主要关注 ...
随机推荐
- go 上下文context
go控制并发有两种经典的方式,一种是WaitGroup,另外一种就是Context WaitGroup这种方式是控制多个goroutine同时完成 func main() { var wg sync. ...
- mysql (mariadb)表结构添加修改删除方法总结
1,添加表字段 alter table table1 add ptel varchar(100) not Null; alter table table1 add id int unsigned no ...
- java、javaw和javaws的区别
java.javaw和javaws的区别: 首先,所有的这些都是java的启动装置,java.exe经常使用,当使用命令行输出到window的时候,会有java.exe进程,通过任务管理器可以看到.通 ...
- mysql 8.0.15忘记密码重置方法
1.打开命令窗口cmd,输入命令:net stop mysql,停止MySQL服务, 2.开启跳过密码验证登录的MySQL服务 输入命令 mysqld --console --skip-grant-t ...
- CSS-05 html和body标签
html和body标签 一直对这两个标签有迷惑,查了一些网上资料整理了一下. 1.html和body标签的背景 1.当给body一个背景色时候,背景图是充满整个窗口的,这里看上去是body标签下的背景 ...
- smbumount - 为普通用户卸载smb文件系统
总览 smbumount 装载点 描述 普通用户使用这个程序可以卸载smb文件系统.它在工作时会suid到root身份,并且向普通linux用户提供了对资源更多的控制能力.在suid方面,它拥有足够的 ...
- (ACM模板)栈stack
#include<iostream> #include<cstdio> #include<stack> using namespace std; stack< ...
- vue中引入了sass,又引入cssnano报错
"cssnano": { // preset: "advanced", autoprefixer: false, "postcss-zindex&qu ...
- Java管道流学习
管道流 作用:用于线程之间的数据通信 管道流测试:一个线程写入,一个线程读取 import java.io.IOException; import java.io.PipedInputStream; ...
- 12.整合neo4j
neo4j 官网下载: https://neo4j.com/download-center/#community 教程: http://neo4j.com.cn/public/cypher/defau ...