Git commit --amend 修改提交信息操作
作者:hanchao5272 时间:2022-11-01 02:03:32
amend
翻译成中文:修改
1.修改还未push的提交
//修改最近一次提交
git commit --amend
//进入注释页面,进行修改
//修改后保存退出
2.修改已经push的提交
//修改最近一次提交
git commit --amend
//进入注释页面,进行修改
//修改后保存退出
//强制推送
git push --force-with-lease origin master
补充知识:git 使用amend补上遗漏文件
适用场景:上一次提交遗漏了一些文件,需要补交,但不想多一次commit
git commit -m 'initial commit'
git add forgotten_file
git commit --amend --no-edit
该操作会修改上一次提交的内容,但不会要求你编辑提交信息,仍保持上一次commit的message
来源:https://blog.csdn.net/hanchao5272/article/details/79230696
标签:Git,commit,amend,提交信息
![](/images/zang.png)
![](/images/jiucuo.png)
猜你喜欢
python切割图片的实现示例
2023-05-14 12:42:19
![](https://img.aspxhome.com/file/2023/9/114799_0s.jpg)
python接口测试返回数据为字典取值方式
2021-09-27 07:37:00
![](https://img.aspxhome.com/file/2023/8/97668_0s.png)
Python注释、分支结构、循环结构、伪“选择结构”用法实例分析
2021-01-15 14:45:25
![](https://img.aspxhome.com/file/2023/7/69587_0s.png)
php测试kafka项目示例
2023-11-19 20:40:04
Python实现将SQLite中的数据直接输出为CVS的方法示例
2022-10-01 00:05:32
asp访google分页代码
2009-07-10 13:06:00
从外到内提高SQL Server数据库性能
2009-01-22 14:12:00
![](https://img.aspxhome.com/file/UploadPic/20091/2009122172131354.jpg)
Python开发之基于模板匹配的信用卡数字识别功能
2021-08-09 22:30:27
![](https://img.aspxhome.com/file/2023/3/120273_0s.png)
细化解析:转换 SQL数据库时的疑难问题
2009-02-05 15:38:00
python中异常捕获方法详解
2021-10-30 10:06:09
IDEA最新激活码永久激活教程附激活失败原因汇总
2023-12-13 11:57:29
![](https://img.aspxhome.com/file/2023/5/131895_0s.png)
Python搜索引擎实现原理和方法
2023-06-26 05:35:32
![](https://img.aspxhome.com/file/2023/7/67327_0s.png)
Python之freegames 零代码的22个小游戏集合
2023-07-29 16:24:05
![](https://img.aspxhome.com/file/2023/4/84924_0s.png)
tensorflow创建变量以及根据名称查找变量
2023-08-13 10:13:06
在TABLE中模仿excel的单元格移动
2007-12-22 12:03:00
Python实现将照片变成卡通图片的方法【基于opencv】
2023-06-08 11:32:54
Mysql Innodb引擎优化(参数篇)
2010-05-02 19:57:00
Python实战小项目之Mnist手写数字识别
2023-01-20 23:24:56
![](https://img.aspxhome.com/file/2023/8/114668_0s.png)
Google logo “我的中国”谷歌国际少年绘画大赛小学1-3年级
2008-12-19 12:26:00
![](https://img.aspxhome.com/file/UploadPic/200812/19/j1-3_01-72s.jpg)
Python3读取和写入excel表格数据的示例代码
2022-01-21 10:33:55
![](https://img.aspxhome.com/file/2023/4/114514_0s.png)