简体   繁体   中英

Visual Studio 2019 won't stage added files to a Git repo

In Visual Studio 2019 I add files to a Project in a Solution by either by A) in Solution Explorer using the right-click menu on the Project -> Add -> Existing Item and selecting files, or B) dragging those files from Windows Explorer to that Project in Solution Explorer. In either case I can't find a way to add those files to the Project's/Soution's Git repository. The Git Changes tab doesn't "see" those files at all, even though the.voxproj file is shown to be modified and committable. How do I add existing programming/text files to a Visual Studio 2019 Project and then add those files to the Git repo Visual Studio 2019 creates/manages for that Project in Visual Studio 2019?

Ok, I have figured it out. The Visual Studio Solutions Explorer is completely divorced from the underlying file system. If you move it in Visual Studio, it DOSN'T move in the directories. So if I want a file to be included in the Git repo I have to move it there manually.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM