rinesh
rinesh

Reputation: 545

How can I add a folder to git source control, which i have copied to local git repository, using visual studio?

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

Answers (1)

Julian
Julian

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)

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)

Upvotes: 1

Related Questions