Skip to content

Git 修改任意一条提交记录信息 #4

@guanguans

Description

@guanguans

Git 修改任意一条提交记录信息

git rebase -i b5785a8

  1. git rebase -i 目标 commit id 的上一条 commit id 例如:git rebase -i b5785a8
  2. 在编辑界面中指定需要操作的 commits 以及操作类型(将要修改的 commit 类型 pick 改成 edit);
  3. 修改提交记录 git commit --amend
  4. git rebase --continue 交互合并完成;
  5. 中途出错可以 git rebase --abort 恢复初始状态。

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions