locked
how to add existing files to source control RRS feed

  • Question

  • I have a project that's added to source control, but there's also some files that's not added. how can I add these files?
    When I right click I don't get any options for source control.

    The files:

    thanks!


    Senior .NET Developer

    Monday, October 23, 2017 9:09 PM

All replies

  • Hi Stein TheRuler,

    Thanks for posting here.

    What is type of your source control? TFVC or Git? If you are using TFVC, you can try to open the "Source Control Explorer", then right click on that window, you can select the "Add Items to Folder...". Find the files you want to add to source control:

    If you are using git, you can try to remove those files from .gitignore file.

    Hope this helps.


    MSDN Community Support Please remember to click Mark as Answer. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.


    Tuesday, October 24, 2017 7:21 AM
  • thanks for replying!

    I created a new repository (LC Development) and connected to it through Source Control Explorer and Team Explorer.
    I mapped it to a local folder that contains all the projects and solutions I want to add.

    I then ran a folder Compare and selected all the folder and files and selected Add Files resulting in an error saying it was unsupported pending changes and that I have to use Project creation wizard, but in Source Control Explorer all the files are listed with add as Pending Change.
    When I right click repository and select Check in Pending Changes and click Check In in Team Explorer it starts to check in the files, but results in error "Unsupported pending change attempted on team project folder $/LC Development.  Use the Project Creation Wizard in Team Explorer to create a project or the Team Project deletion tool to delete one."

    So.. am I doing something wrong?


    Senior .NET Developer

    Wednesday, October 25, 2017 4:24 PM
  • I've tried adding it using Add to source control, but same result

    Senior .NET Developer

    Wednesday, October 25, 2017 8:52 PM
  • You cannot add new repository folder into Source Control. (Eg, LC Development). The top level of the source tree is reserved for Team Projects. You should create the Team project on your web browser to your visualstudio.com homepage, then connected to team project through Team Explorer. Please follow the steps in below document:

    https://docs.microsoft.com/en-us/vsts/accounts/create-team-project?tabs=vsts

    https://docs.microsoft.com/en-us/vsts/tfvc/create-work-workspaces


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Thursday, October 26, 2017 8:01 AM