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

"Cannot checkout as your working directory has uncommitted changes" appearing without pending changes #1691

Closed
matt-neubert opened this Issue May 18, 2018 · 9 comments

Comments

Projects
None yet
3 participants
@matt-neubert

matt-neubert commented May 18, 2018

  • GitHub Extension for Visual Studio version: 2.5.1.2234 & previous version
  • Visual Studio version: 15.7.1 & previous

I am not able to checkout a branch from the pull request. When I hover over the link, it a help text pops up that reads, "Cannot checkout as your working directory has uncommitted changes." I do not have any pending changes in my current directory. I have checked multiple times. Could it be that it is not looking at the gitIgnore? This seems to only be an issue with one repository. It does allow me to checkout the branch on a sample and another small repo I have for another project, but not sure why it doesn't allow me on our main repo. Any ideas?

image

@matt-neubert

This comment has been minimized.

matt-neubert commented May 18, 2018

This can be labeled "help wanted".

@jcansdale

This comment has been minimized.

Contributor

jcansdale commented May 18, 2018

Hi @matt-neubert,

Is the repo you're working on public and would you be able to share it? If you were able to zip it up and drop the file here, that would likely save time attempting to repro. Alternatively you could email it to my username @ github.com.

@meaghanlewis

This comment has been minimized.

Contributor

meaghanlewis commented May 18, 2018

Hi @matt-neubert I noticed this as well. If you press the refresh button at the top of the page does that help?

checkout with changes

@matt-neubert

This comment has been minimized.

matt-neubert commented May 18, 2018

@meaghanlewis, the refresh button does not work for me. Is there something I can do to debug what it thinks is pending?

@matt-neubert

This comment has been minimized.

matt-neubert commented May 22, 2018

@jcansdale , the repo is not public and is fairly large, I have sent an invite link to the email above. I have cloned it to a new folder and did not open it in VS and it still won't all me to checkout the branch. I also updated the GitHub VS plugin. I also had someone on my team install it and the same issue happened. Is there a way to debug what the app thinks is open?

@jcansdale

This comment has been minimized.

Contributor

jcansdale commented May 25, 2018

@matt-neubert Thanks! I was able to reproduce and will investigate further tomorrow....

@jcansdale

This comment has been minimized.

Contributor

jcansdale commented May 25, 2018

Hi @matt-neubert,

Some work in progress debugging for you. These files appear to be the issue:
image

I think it might be related to this:
https://stackoverflow.com/questions/4610561/untracked-files-not-shown-in-git-status

I'll continue to investigate.

@jcansdale

This comment has been minimized.

Contributor

jcansdale commented May 25, 2018

@matt-neubert,

I've submitted a PR with a fix/workaround for this #1706. I'm still fuzzy as to why these files are showing as being deleted from working directory. It's maybe something about the .gitignore file, but even if delete .gitignore the files doesn't show up in git status. Very strange!

Here is a .vsix installer for you to try: GitHub.VisualStudio.zip

Please comment on #1706 is it does/doesn't work.

Thanks for submitting the issue.

@matt-neubert

This comment has been minimized.

matt-neubert commented May 29, 2018

The PR #1706 seems to fix this issue for me.

@meaghanlewis meaghanlewis added the bug label May 29, 2018

@meaghanlewis meaghanlewis added this to Medium Priority in BUGS May 29, 2018

@meaghanlewis meaghanlewis moved this from Medium Priority to Low Priority in BUGS May 29, 2018

@meaghanlewis meaghanlewis moved this from Low Priority to Medium Priority in BUGS May 29, 2018

@meaghanlewis meaghanlewis moved this from Medium Priority to In Progress in BUGS May 31, 2018

@meaghanlewis meaghanlewis added this to the 2.5.3 milestone Jun 6, 2018

BUGS automation moved this from In Progress to Done Jun 8, 2018

@meaghanlewis meaghanlewis removed this from Done in BUGS Jun 18, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment