Is there a way to rebase and squash commits on Git

2019-04-10 04:46发布

Is there a way to rebase and squash commits on Gitlab CE UI, instead of using the interactive mode through command-line?

2条回答
放荡不羁爱自由
2楼-- · 2019-04-10 05:23

It seems implemented in issue EE 150 to the EE PR 1024, for allowing squashing merge request (GitLab EE 8.17).
See the documentation (EE for now) "Squash and merge".

https://docs.gitlab.com/ee/user/project/merge_requests/img/squash_mr_widget.png

The CE issue 4106 advocates for that feature to migrate back to CE.

Update Feb. 2018, a year later: as Jürgen Steinblock adds in the comments:

Great news!
It looks like this will make it into 10.8: see issue 34591: "Squash and merge in GitLab Libre (CE)".


Update June 2018: Jürgen Steinblock confirms in the comments:

GitLab 11 now includes Squash and merge for all editions, even Core (You have to manually enable a checkbox for existing merge requests and while creating new ones)

https://about.gitlab.com/images/11_0/squash-and-merge-core.png

That will help keeping the Git history clean!

查看更多
倾城 Initia
3楼-- · 2019-04-10 05:28

Currently (as of version 11.4.4) it does not appear that GitLab (any edition) supports Squash when using Rebase. This might be due to the way Squash works as a part of the "interactive" feature of Rebase (see command "rebase -i").

查看更多
登录 后发表回答