VS Code no longer supports 'edit' in 'git rebase' flow
See original GitHub issueAs of a latest update, VS Code now does the wrong thing when using the Source Control pane during a git rebase
command. git rebase -i
allows the rebase to be stopped in in order to edit
commits. This includes undoing them, changing the commit message, or adding more commits. Now, instead of just allowing commits as usual, VS Code attempts to use git rebase --continue
after altering a commit, which fails because there is still a commit pending that is not the original.
- VSCode Version: 1.28.2 (system setup)
- OS Version: Windows 10 Enterprise 1809 17763.55
Steps to Reproduce:
- Create a new branch, and add at least one commit to the branch.
- In the terminal, do
git rebase -i master
- In the editor for the interactive rebase, change a commit from
pick
toedit
- Close the editor.
- Git will start the rebase, and stop on the commit. It will prompt to amend the commit or add more.
- In the Source Control pane, use ‘Undo last commit’
- Once the commit is soft reset, attempt to edit the commit. Rename the commit description or make more local changes.
- Note that VS Code shows a warning that editing the commit is not allowed, even though Git specifically allows it here.
- Attempt to commit anyway through the Source Control pane.
- VS Code pops a dialog from Git, saying that the operation is not allowed.
- In the Git log, observe that the commit action actually sent
git rebase --continue
, which is not correct. It should have just done a usualgit commit
One can work around the issue by completing the commit in the terminal window, but using VS Code normally handles the work of auto-staging files and deletions, making it a lot more useful.
This used to work! If you want to be more helpful during rebases, I suggest adding a dedicated ‘continue’ button instead of altering the behavior of the commit button.
Does this issue occur when all extensions are disabled?: Yes
Issue Analytics
- State:
- Created 5 years ago
- Reactions:14
- Comments:8 (3 by maintainers)
Top GitHub Comments
Great point.
thanks!!!