1

Is there any way to add a folder to git source control(Like "Add to source control" option for TFVC) from visual studio.

Julian
  • 33,915
  • 22
  • 119
  • 174
rinesh
  • 493
  • 1
  • 8
  • 26

1 Answers1

1

If the folder has files, and those are included in your project, then you could commit them in the team explorer. (Tab changes)

enter image description here

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.

enter image description here

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)

Julian
  • 33,915
  • 22
  • 119
  • 174