Git交互式rebase重写提交

Git交互式rebase重写提交,git,edit,rebase,git-commit,Git,Edit,Rebase,Git Commit,我想用交互式重基编辑提交。当我将pick替换为edit时,此提交的更改仍然应用于repo(以便我可以编辑提交),但我想从头重写它。如何执行此操作?在交互式重新基准期间编辑提交后,您应该能够将其状态签出到父提交(这意味着工作树将反映应用提交更改之前的状态) cd /path/to/repo/root/folder git checkout @~ -- . # make additional changes git commit -m "rewrite commit" git reba

我想用交互式重基编辑提交。当我将pick替换为edit时,此提交的更改仍然应用于repo(以便我可以编辑提交),但我想从头重写它。如何执行此操作?

在交互式重新基准期间编辑提交后,您应该能够将其状态签出到父提交(这意味着工作树将反映应用提交更改之前的状态)

 cd /path/to/repo/root/folder
 git checkout @~ -- .

 # make additional changes
 git commit -m "rewrite commit"

 git rebase --continue