Reputation: 545
Is there any way to add a folder to git source control(Like "Add to source control" option for TFVC) from visual studio.
Upvotes: 1
Views: 5833
Reputation: 36710
If the folder has files, and those are included in your project, then you could commit them in the team explorer. (Tab changes)
Please note that Git doesn't track empty folders. If you need a folder without files, check How can I add an empty directory to a Git repository?
Update, for files that should not be compiled etc, you could set "build action" to "none" for those files.
Update 2: if you need those files in Git but not in your project, you need something next to Visual Studio I'm afraid. I could recommend Tortoise Git (https://tortoisegit.org/) for Windows users.
(Or maybe there is a Visual Studio plugin for this)
Upvotes: 1