vscode: Git: Can't rebase continue or commit without modified files
From @schollii
- While a branch is checked out, I do a
git rebase masterfrom command line (bash on ubuntu), and git hits a conflict. - I then go to the vs code window where the folder is open. In the Git panel on the left, I can see the file listed under Merge with a C as status, and I can see there are conflict markers in the file.
- I resolve each conflict and save.
- The file status changes to M once all conflicts resolved.
- Then I can click the plus sign on the file, and the file disappears from the Merge (perhaps a commit occurs then?). But a rebase continuation does not happen, there is nothing under Commit, and there is no option to do rebase continue.
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 25
- Comments: 18 (8 by maintainers)
I run into this issue several times. If I try to
continuethe rebase via terminal, it tells the following:If there are other changes than the conflicted files, VSCode can continue the rebase by just clicking
commit. Here that doesn’t work.The line that helped me was the following from the error log above:
My workaround:
+git rebase --skipin the terminalSuggestion: So maybe a solution could be (analog to the
rebasebehavior) to tell VSCode to rungit rebase --skipif there are no staged files inrebase in progressstate when the user clickscommit.@skprabhanjan referring to the issue I’ve opened yesterday (#60275 ), the steps are a bit different. When I accept the current changes (so the file is identical to the version of the last commit) and I click on “+” sign the file disappears from “Merge Changes” but doesn’t appear under “Staged Changes”.
Hope you find this useful, thanks in advance
Steps to verify:
rebase-test)mainbranch, make a change in a file, and commitGit: Rebase Branch...command and choose themainbranchmainbranch+action to stage the changeI run into this from time to time as well. Just this last time, I had to
git rebase --skipall the commits locally. Then I click the button to pull/push to my remote which then introduced the same merge conflicts that I had during my first --skip locally. Resolved those and committed. Then my pull/push commit counts changed from 3/22 to 0/23. Clicked the button again to push all 23 back up to my remote. Very confusing process though.Well, no… the staging it correct. Staging those files will end up in a no-op. The problem is that you can’t commit in VS Code without changes, although you’d want to continue the rebase/merge in this case. I will remove the
help wantedlabel as this seems to be an advanced issue.@joaomoreno , few points to just clear things I tried reproducing this taking the comments into consideration.( referring to all 3 issues that were opened before)
git rebase masterdid throw an error in the bash saying merge conflictUntil this point
git rebase --continuewas not run even though the rebase was in progress (Referring to https://github.com/Microsoft/vscode/issues/6614#issuecomment-415729755). Attaching the git log file for these operations. log.txtSo after the 4th point is when the
git rebase --continuecommand should run?Please clarify if I am in the correct path 😃 Thanks!
@joaomoreno , can i work on this? 😃
i still cannot continue the rebase wiht ui cause of empty commit. the old FR #6614 took 2 years, how long will it be this time