问题
I'm currently using Visual Studio Premium 2013 Update 3 with Team Foundation Server Online and using a Git Repo. I've been using the Git Repo successfully for months up until recently. Now whenever I save a file, Visual Studio acts like the file was checked-in. Files no longer show in Included Changes, Excluded Changes, or Untracked Files once they've been saved. I added around 6 new projects to the solution today and every one of them started-out with the proper (add) icon, but upon working in Studio and saving files throughout the day, they all now have a lock icon and show as "Checked In".
I can remove a project or file and add it back, which causes the check-out symbol, but as soon as I save all changes, they're back to checked-in.
Sync with the online repo doesn't propagate the changes so they're not really being recognized as checked-in changes.
Has anyone else experienced this issue and found a solution?
UPDATE: This is likely specific to renaming the solution file. I had renamed the solution file and after doing this the problem occurred. After following the steps listed in the answer below and committing/syncing with the online repository, opening the solution back up now works normally again.
回答1:
The tip about 'git status' lead me to a solution. I'm not sure exactly how this worked or what the root cause of the issue was, but these steps put me back on track:
- Navigate to Team -> Connect to Team Foundation Server
- Right-click the project listed on xxx.visualstudio.com and choose 'Connect'
- Click the project name at the top, and choose 'Changes'
- Choose 'Actions' next to the commit button and pick 'Open Command Prompt'
- Type 'git status'
- Assuming you actually have changes listed in the command window - Navigating back to 'Changes' in Visual Studio should now show all the Included & Excluded changes in Visual Studio
I'll follow-up if this actually solves the automatic check-in issue I was having with the solution as-well.
来源:https://stackoverflow.com/questions/25840607/visual-studio-2013-with-tfs-online-using-git-saving-files-checks-in-automatical