patch - 如何让多次 git 的提交作为一个补丁输出?
迷茫
迷茫 2017-04-22 09:00:44
0
1
870

可能我说的不准确,我把我现在的解决方法说一下
1. 创建新分支(设原分支为 master)
git checkout -b dev
2. 进行多次提交
git commit * N times
3. 从 master 再创建一个分支
git checkout master && git checkout -b release
4. 用 squash 命令 git merge dev --squash
并且编辑一下 comment
5. 用 git format-patch 导出补丁
6. 补丁被认可后,删掉 dev,release 分支

我觉得我的方法很麻烦,请问大家建议我怎么做?

迷茫
迷茫

业精于勤,荒于嬉;行成于思,毁于随。

reply all(1)
迷茫

If you want to merge these submissions, you can:

  1. Use git rebase -i [the IDs of the previous commits]
  2. Change pick in front of the first commit to be merged to reword
  3. Change pick in front of other submissions to squash

In this way, modifying comments and merging submissions are completed at the same time. Then format-patch normally.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template