Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VS Code incorrectly detects rebase in progress #57299

Closed
schroding3rscat opened this issue Aug 27, 2018 · 11 comments
Closed

VS Code incorrectly detects rebase in progress #57299

schroding3rscat opened this issue Aug 27, 2018 · 11 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug git GIT issues verified Verification succeeded

Comments

@schroding3rscat
Copy link

Issue Type: Bug

After working with a code and before committing anything to a repo, I stashed all changes and started rebase from SourceTree. VS Code showed me conflicts properly. I did all merge operations in Visual Studio 2017, committed and pushed all changes. There was a bunch of other git operations later. I closed and opened VS Code, restarted PC, did some coding, committed and pushed something. But still, I see a warning that I cannot change commit message in the middle of a rebase:
screenshot_4

If I try to commit anything from VS Code, I see error popup:
screenshot_5

When I press commit button, I see new lines added to git output in VS Code:

git rebase --continue
No rebase in progress?
git config --get-all user.name
git config --get-all user.email

All other git clients working fine and I can do all git operations. Git syncing and branch switching don't help.
git status output:

λ git status
On branch feature/dev-trials-support
Your branch is up to date with 'origin/feature/dev-trials-support'.

Changes to be committed:
  (use "git reset HEAD <file>..." to unstage)

        modified:   docker-compose.yml

I didn't manage to get rid of this, so I assume there's a bug with the git module.

VS Code version: Code 1.26.1 (493869e, 2018-08-16T18:38:57.434Z)
OS version: Windows_NT x64 10.0.17134

Extensions (18)
Extension Author (truncated) Version
RPMSpec 1do 0.1.0
unique-lines bib 1.0.0
vscode-raml blz 3.0.1
dart-code Dar 2.17.1
flutter Dar 2.17.1
EditorConfig Edi 0.12.4
LogFileHighlighter emi 2.4.0
vsc-material-theme Equ 2.3.0
vscode-guid hea 1.3.1
rest-client hum 0.19.1
ecdc mit 0.12.0
python ms- 2018.7.1
csharp ms- 1.15.2
Go ms- 0.6.88
vscode-yaml red 0.0.15
vscode-icons rob 7.25.0
vscode-todo-highlight way 1.0.4
change-case wma 1.0.0

(4 theme extensions excluded)

@vscodebot
Copy link

vscodebot bot commented Aug 27, 2018

(Experimental duplicate detection)
Thanks for submitting this issue. Please also check if it is already covered by an existing one, like:

@vscodebot vscodebot bot added the git GIT issues label Aug 27, 2018
@joaomoreno
Copy link
Member

I did all merge operations in Visual Studio 2017, committed and pushed all changes.

How did you commit. If you are in a middle of a rebase, you should've used git rebase --continue: https://help.github.com/articles/resolving-merge-conflicts-after-a-git-rebase/

Anyway, is there a .git/REBASE_HEAD file in your git repo? If so, just delete it.

@joaomoreno joaomoreno added the info-needed Issue requires more information from poster label Aug 28, 2018
@schroding3rscat
Copy link
Author

How did you commit. If you are in a middle of a rebase, you should've used git rebase --continue

I did all the work in SourceTree as usual. SourceTree, Visual Studio 2017 and git status don't show any rebase process now. Why does VS Code do?
I do have .git/REBASE_HEAD. But before deleting it I want to know why VS Code behaves like this.

@joaomoreno
Copy link
Member

VS Code checks whether that file exists to determined if there's a rebase in flow. Apparently that check is insufficient and we should also check for other signs of rebase.

@schroding3rscat
Copy link
Author

Great! Do you need any additional info from me?

@joaomoreno
Copy link
Member

Can you show me the full output of git status?

@joaomoreno
Copy link
Member

@joaomoreno joaomoreno added bug Issue identified by VS Code Team member as probable bug and removed info-needed Issue requires more information from poster labels Aug 28, 2018
@joaomoreno joaomoreno changed the title VS Code shows git rebase process when I don't have one VS Code incorrectly detects rebase in progress Aug 28, 2018
@joaomoreno joaomoreno added this to the Backlog milestone Aug 28, 2018
@joaomoreno joaomoreno added help wanted Issues identified as good community contribution opportunities good first issue Issues identified as good for first-time contributors labels Aug 28, 2018
@schroding3rscat
Copy link
Author

Can you show me the full output of git status?

I'm afraid I can't. I checked the git section in vscode and it seems that problem disappeared now. Today I did a rebase in SourceTree again and switched branches. I think this helped and REBASE_HEAD was removed.
But I added git status output to the bug description when I created it yesterday. I run this command when I had a problem.

@jeanbenitez
Copy link

Hi! I had the same issue, I solved removing .git/REBASE_HEAD:
rm -rf .git/REBASE_HEAD

@dklotz
Copy link

dklotz commented Sep 11, 2018

I ran into the same issue after doing an interactive rebase in another external tool, Fork in my case. I could also solve it by removing the REBASE_HEAD file. The output of git status (before I removed that file) is simply:

On branch foo-bar-feature
nothing to commit, working tree clean

@joaomoreno joaomoreno modified the milestones: Backlog, September 2018 Sep 12, 2018
@joaomoreno joaomoreno removed good first issue Issues identified as good for first-time contributors help wanted Issues identified as good community contribution opportunities labels Sep 12, 2018
@joaomoreno
Copy link
Member

Fixed by #57651

joaomoreno pushed a commit that referenced this issue Sep 13, 2018
* Test #57299 - script to stage test data.

* Fix #57299 - improve git rebase detection

* Revert "Test #57299 - script to stage test data."

This reverts commit 5f7142c.
@sbatten sbatten added the verified Verification succeeded label Sep 27, 2018
@vscodebot vscodebot bot locked and limited conversation to collaborators Oct 28, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug git GIT issues verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

5 participants