locked
Remove Assocaition Between Visual Studio 2017 Solution and GitHub Repository RRS feed

  • Question

  • Hello there

    How do I remove the association between my Visual Studio 2017 and a GitHub repository?

    I have done the following:

    - Deleted the files starting "git" from my solution's folder

    - Deleted the Github repository

    - Checked that the repository is not referenced in the Registry

    - Removed the repository from the list in "Local Git Repositories" (whilst my solution isn't loaded).

    None of this works - within Visual Studio it is still showing all the files checked out.

    I have tried to commit, just to see if the error message provides any additional details.  Clearly this is not going to work given that I have deleted the repository.  Doing this generates the error

     Git failed with a fatal error.
    error: open(".vs/SigMania/v15/Server/sqlite3/db.lock"): Permission denied
    fatal: Unable to process path .vs/SigMania/v15/Server/sqlite3/db.lock

    Any help greatly appreciated.

    Geoff Olding

    Thursday, January 24, 2019 11:13 PM

Answers

  • Hi Geoff_Olding,

    Glad to hear you solved this issue!

    Absolutely, it’s a worthy way to solved this issue for now, and I hope you could mark this workaround as answer. You know that, we will close this case and other members who are interesting to it or encounter same issue as you could get a favor quickly.

    Thank you for your understanding.

    May


    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

    • Marked as answer by Geoff_Olding Monday, February 10, 2020 7:34 PM
    Monday, January 28, 2019 8:04 AM
  • Hello there

    Many thanks for your assistance.

    I had in fact read through those posts, but had missed the key think to do, which was to delete the hidden .git directory (in addition to the two visible files).

    In the end I did the following:

    - Deleted the hidden .Git directory.

    - From Visual Studio, used "File - add to Source Control" to create a new local repository and attach to it.

    - Pressed the sync button to upload my solution to a new repository I had created on the GitHub web-site.

    The interface from within Visual Studio is truly terrible.  Of particular note are the following:

    - It doesn't tell you which repository you are currently attached to.

    - you can remove a GitHub repository from within Visual Studio (provided you aren't currently attached to it).  However, when you reload your solution it adds back the repository and reattaches to it.  What exactly does Visual Studio think we mean when we tell it to remove a repository?

    - It allows you to add a local repository and provide a path, but then doesn't provide any way for you to attach to it.

    Regards


    Geoff Olding

    • Proposed as answer by May Luo-MSFT Monday, January 28, 2019 7:58 AM
    • Marked as answer by Geoff_Olding Monday, January 28, 2019 8:22 AM
    Friday, January 25, 2019 3:18 PM

All replies

  • Hello,

    From Team Explorer without any solutions open, select the repo, right click, select "Remove", have you tried that?


    Please remember to mark the replies as answers if they help and unmark them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.
    VB Forums - moderator
    profile for Karen Payne on Stack Exchange, a network of free, community-driven Q&A sites

    • Proposed as answer by RatMonkey Monday, February 10, 2020 10:44 AM
    Friday, January 25, 2019 2:42 AM
  • Hi Geoff_Olding

    Welcome to the MSDN forum.

    Please check these thread that some members have discussing similar issue in: https://stackoverflow.com/questions/32304977/remove-git-mapping-in-visual-studio-2015 and https://stackoverflow.com/questions/20980389/remove-git-binding-from-visual-studio-2013-solution and https://stackoverflow.com/questions/21150060/how-can-you-disable-git-integration-in-visual-studio-2013-permanently/33789257#33789257

    I tried to detect this one that gain a highest workaround, It works for me : https://stackoverflow.com/a/35517310 . I recommend you can try these methods one by one.

    Navigate to your solution's UNC Path. Example: C:\Users\Your User Name\Documents\Visual Studio 2017\Projects\Your Project Folder

    Then permanently delete ("SHIFT + DEL") the .git* files and folder. There are two files and one folder, which may be hidden so ensure you have your folders and search options > View > show hidden files, folder, and drives (Radio Button) Selected. The files to permanently delete are:

    • .gitignore (file)
    • .gitattributes (file)
    • .git (folder)

    If any error still occurs or none of solution could be helpful. Please feel free to let me know and share detail info here. we will help you to diagnose it further.

    Br

    May


    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

    Friday, January 25, 2019 6:02 AM
  • Hello there

    Many thanks for your assistance.

    I had in fact read through those posts, but had missed the key think to do, which was to delete the hidden .git directory (in addition to the two visible files).

    In the end I did the following:

    - Deleted the hidden .Git directory.

    - From Visual Studio, used "File - add to Source Control" to create a new local repository and attach to it.

    - Pressed the sync button to upload my solution to a new repository I had created on the GitHub web-site.

    The interface from within Visual Studio is truly terrible.  Of particular note are the following:

    - It doesn't tell you which repository you are currently attached to.

    - you can remove a GitHub repository from within Visual Studio (provided you aren't currently attached to it).  However, when you reload your solution it adds back the repository and reattaches to it.  What exactly does Visual Studio think we mean when we tell it to remove a repository?

    - It allows you to add a local repository and provide a path, but then doesn't provide any way for you to attach to it.

    Regards


    Geoff Olding

    • Proposed as answer by May Luo-MSFT Monday, January 28, 2019 7:58 AM
    • Marked as answer by Geoff_Olding Monday, January 28, 2019 8:22 AM
    Friday, January 25, 2019 3:18 PM
  • Hello there

    Thanks for your reply.  I have now resolved the issue, as per my reply below.

    Yes, I did try the "Remove" option many times.

    As per my comment below, this aspect of the UI is totally stupid.

    Regards

    Geoff Olding

    • Proposed as answer by May Luo-MSFT Monday, January 28, 2019 1:44 AM
    Friday, January 25, 2019 3:20 PM
  • Hi Geoff_Olding,

    Glad to hear you solved this issue!

    Absolutely, it’s a worthy way to solved this issue for now, and I hope you could mark this workaround as answer. You know that, we will close this case and other members who are interesting to it or encounter same issue as you could get a favor quickly.

    Thank you for your understanding.

    May


    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

    • Marked as answer by Geoff_Olding Monday, February 10, 2020 7:34 PM
    Monday, January 28, 2019 8:04 AM