0

I noted that some files in my solution explorer are not in source control as they do not have a padlock icon. I tried to rebind the solution as suggested here but I do not have a Source Control menu item under file.No source control option in File menu

Community
  • 1
  • 1
user1447435
  • 145
  • 1
  • 10

3 Answers3

2

It seems you are using Git as your source control. There is no Source Control menu item under File for Git. It’s a normal phenomenon. This menu item is only for TFVC.

No matter your folder(Solution items) are adding in source control or not, there is no padlock icon in front of it. It’s by designed. Normally, if you can see it in Solution Explorer, means it has been added in source control. You can double check it through your Web Portal(Code→Git→Your solution) enter image description here

If you can’t see it , you want to add it in source control. Right click your solution in Solution Explorer, select source control, select commit, then commit and push. Or use git command, $ git add . /$ git commit -m "First commit"/ $ git push origin master

PatrickLu-MSFT
  • 49,478
  • 5
  • 35
  • 62
1

You can enable/disable the plugin selection from Tools->Options if you are using TFVC as your source control although I suspect Patrick is right with his assumption on Git.

demokritos
  • 1,416
  • 2
  • 12
  • 34
1

I was indeed using Git but even right-clicking on my solution did not provide me with the source control option (as @Patrick suggested). Eventually I noted that in Team explorer > Changes there was a section containing Untracked Files. I clicked Add all, and these files started being tracked, thus solving my problem.

user1447435
  • 145
  • 1
  • 10