在git 中修改之前的提交内容
来源:互联网 发布:小额贷款app源码 编辑:程序博客网 时间:2024/05/21 03:26
备录下,省的又忘了。
比如要修改之前的commit的 hashcode为:187f869c9d54c9297d6b0b1b4ff47d2ec781a55e
Step 1:
先用git rebase 187f869c9d54c9297d6b0b1b4ff47d2ec781a55e^ --interactive //退回到要修改的commit的前一个点上,
执行后,git会调用默认的vi编辑器显示commit到最新commit的所有记录,把我们要修改的那一项的首行的pick 改成edit。
Step 2: 修改完我们要修改的内容后,利用git add 添加
git add <filepattern>
Step 3: git commit --amend //修改这个commit
Step 4: git rebase --continue // 提交修改后的commit 并且返回到原来的head 处。
If you’re like me, a fan of rebasing local work before publishing, maybe you receive this error:
"interactive rebase already started"
This happens when you abort in the middle of a rebase.
The way to fix it is using:
git rebase -i --abort
转自:http://blog.csdn.net/wangbole/article/details/8552808
0 0
- 在git 中修改之前的提交内容
- 在git 中修改之前的提交内容
- 在git 中修改之前的提交内容
- linux git 显示某次提交的中修改内容
- git修改提交的注释内容
- git修改前一次提交的内容
- git 修改已提交的内容
- git修改上一次提交之前的提交git commit --fixup
- git 在提交之前撤销add操作
- GIT 在提交之前撤销add操作
- Git 查询某次历史提交的修改内容
- 项目提交git之前要做的
- git实战总结-----在一系列提交中修改一个特定的commit
- [Git] 修改之前某次 commit 日志和内容
- 在开发修改了分支内容之后但是在历史中没有看到开发的提交记录
- 在一个修改了数据的事务被提交之前,Oracle进行了以下操作
- git 修改提交的说明
- git 文件修改的提交
- Android保存数据方式(一)———File
- 使用SQLiteOpenHelper需要注意的问题
- JVM GC调优一则--增大Eden Space提高性能
- PS抠图
- 在论OC中foundation框架(上)
- 在git 中修改之前的提交内容
- Servlet学习笔记(五):ServletConfig和ServletContext详解
- Mahout in action读书笔记&Mahout学习笔记
- CRC16 - CRC64 的碰撞测试
- 世界是数字的重点读书笔记(计算机科普知识)
- PackageManager后台静默安装
- 【笔记】放球模型
- 《c++ primer》第二章学习笔记
- POJ 2828 Buy Tickets