0

我想合并e5c1e1d627c6c6

怎么做 ?我想要一个更简单的方法。

因为如果它们之间有数百个提交,那么回滚然后重新提交会很麻烦。

截屏

* fc60bec - (HEAD, master) Make db migrate (67 seconds ago)
* e5c1e1d - Add application page ,css , javascript (78 seconds ago)
* b6c5b68 - Add sandbox page (3 minutes ago)
* 7552b76 - Add welcome controller (25 minutes ago)
* 627c6c6 - Add themes folder into projects (54 minutes ago)
* 856c719 - Initial commit (68 minutes ago)

当我跑git rebase --interactive 856c719

然后我在下面编辑了文件,保存后。

我有

2_dqa_streesful_server/.git/rebase-merge/stopped-sha: No such file or directory Cannot 'squash' without a previous commit

  1 squash 627c6c6 Add themes folder into projects
  2 pick 7552b76 Add welcome controller
  3 pick b6c5b68 Add sandbox page
  4 squash e5c1e1d Add application page ,css , javascript
  5 pick fc60bec Make db migrate
4

1 回答 1

0

git rebase --interactive 856c719

然后将pick替换为squash以获取您想要压缩(合并)的提交:

pick   856c719 Initial commit
squash 627c6c6 Add themes folder into projects
pick   7552b76 Add welcome controller
pick   b6c5b68 Add sandbox page
squash e5c1e1d Add application page ,css , javascript
pick   fc60bec Make db migrate
于 2014-04-17T09:34:06.420 回答