第二步查看修改 git diff xxxx 第三步提交修改运行 "git commit -a" 命令,效果跟在SVN中使用"commit"命令一样。$ git commit -a执行完之后,一个提交信息的提示会出现在编辑器中(这里$EDITOR环境变量或"core.editor"这两个git配置变量的默认值都是vim)类似下面这样的内容:_ # Please enter the commit message for your changes. Lines starting # with "#" will be ignored, and an empty message aborts the commit. # On branch main # Changes to be committed: # (use "git reset HEAD <file>..." to unstage) # # modified: README # ~ ~ ".git/COMMIT_EDITMSG" 9L, 253C输入一些提交的信息,譬如"added myself to the README as an author"然后退出。 第四步打成Patch包git log 查看提交的idgit format-patch xxxxxxxxxxxxx(commit id)