question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

VS Code no longer supports 'edit' in 'git rebase' flow

See original GitHub issue

As 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:

  1. Create a new branch, and add at least one commit to the branch.
  2. In the terminal, do git rebase -i master
  3. In the editor for the interactive rebase, change a commit from pick to edit
  4. Close the editor.
  5. Git will start the rebase, and stop on the commit. It will prompt to amend the commit or add more.
  6. In the Source Control pane, use ‘Undo last commit’
  7. Once the commit is soft reset, attempt to edit the commit. Rename the commit description or make more local changes.
  8. Note that VS Code shows a warning that editing the commit is not allowed, even though Git specifically allows it here.
  9. Attempt to commit anyway through the Source Control pane.
  10. VS Code pops a dialog from Git, saying that the operation is not allowed.
  11. In the Git log, observe that the commit action actually sent git rebase --continue, which is not correct. It should have just done a usual git 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.

10 26 vs code git rebase edit blocked

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:open
  • Created 5 years ago
  • Reactions:14
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

4reactions
joaomorenocommented, Oct 26, 2018

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.

Great point.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Source Control with Git in Visual Studio Code
Using Git source control in VS Code. Visual Studio Code has integrated source control management (SCM) and includes Git support out-of-the-box.
Read more >
Interactive rebase editor from the GitLens extension - YouTube
Today's VS Code extension tip: GitLens interactive rebase Visually manage git rebases with the GitLens extension. This makes it easy to ...
Read more >
Create a pull request to review and merge code - Azure Repos
Create pull requests (PRs) to change, review, and merge code in a Git repository. You can create PRs from branches in the upstream...
Read more >
Git Workflow | Atlassian Git Tutorial
A git feature branch is a temporary branch used for development or testing purposes. Learn about the best way to manage them using...
Read more >
Git rebase in Visual Studio Code - Stack Overflow
You will have to configure your gitconfig to use vscode for the interactive rebase. Something like: [core] editor = code --wait.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found