Community
Participate
Working Groups
Hi, While doing a rebase (repo in "Rebase interactive" state), buttons "Commit and Push" and "Commit" are available on "Git staging" view. So, a rebase in progress can accidentally be conclude with a commit operation. Would it be possible to hide these buttons during a rebase ? Thank you BR Jérôme
(In reply to Jérôme de Vivie from comment #0) > While doing a rebase (repo in "Rebase interactive" state), buttons "Commit > and Push" and "Commit" are available on "Git staging" view. I agree that "Commit and Push" should be disabled. "Commit" on the other hand can be valid during a rebase (C Git also handles it fine). I adjusted the title.
Even if it is possible with C Git, i do not find a valid reason to do a commit during a rebase. If someone wants to keep already rebased commits, he can do a "rebase --skip".
Commit during rebase makes sense if you want to add a new commit during interactive rebase: let's assume your interactive rebase plan looks initially like this reword feature A edit feature B and let's assume you want to improve feature A's commit message and improve feature B by first doing a refactoring you want to put into it's own new commit so after having reworded the first commit you want add the refactoring in it's own commit and then put feature B on top (which needs to be modified to make use of the refactoring reword feature A new commit refactoring for feature B edit feature B
(In reply to Matthias Sohn from comment #3) > Commit during rebase makes sense if you want to add a new commit during > interactive rebase I agree with you. So my wish concerns only non interactive rebase.
(In reply to Jérôme de Vivie from comment #4) > (In reply to Matthias Sohn from comment #3) > > Commit during rebase makes sense if you want to add a new commit during > > interactive rebase > > I agree with you. So my wish concerns only non interactive rebase. But also during a non-interactive rebase which stops on a conflict I may want to insert a new commit, I think that's why native git also allows to do that
(In reply to Matthias Sohn from comment #5) > (In reply to Jérôme de Vivie from comment #4) > > (In reply to Matthias Sohn from comment #3) > > > Commit during rebase makes sense if you want to add a new commit during > > > interactive rebase > > > > I agree with you. So my wish concerns only non interactive rebase. > > But also during a non-interactive rebase which stops on a conflict I may > want to insert a new commit, I think that's why native git also allows to do > that Here, the new commit was not planned. It is inserted because a conflict happened (non-functional reason). I found this weird. Accidental commit during a non-interactive is quite more common, don't you think so ?