Automatic add

Sep 20, 2011 at 10:34 AM

The feature I'm missing the most (having recently moved from Subversion and AnkshSVN to GIT) is the option to automatically add items to git when they are created with Visual Studio. For example, if I add a new class to a folder that is under source control, the class should be automatically selected for commit when in the commit window.

Currently I often forget to commit files...

Sep 30, 2011 at 1:17 AM
Edited Sep 30, 2011 at 1:30 AM

"...if I add a new class to a folder that is under source control, the class should be automatically selected for commit when in the commit window."

That problem has more to do with how git works than the Git Source Control Provider itself.
While working with git, you may want to modify a file, and not stage it (staging is the process of adding a file to the index file, $prompt> git add . )

To follow that tradition, it is intuitive to have the source control plugin desist from automatically selecting (or staging) any file added by Visual Studio (even if the containing folder is under control).

This issue is really a matter of choice. For example, I do prefer the following method of doing same:

Right-click the solution node > Git (master) > Add file > (Select Add Files... from the dialog)

Automatic addition can be made configurable in the Tools > Options > Source Control > Git Source Control Provider section, anyway.

That'll really be good.

But to be frank, I'm impressed with this provider, so far!

Oct 23, 2012 at 11:20 PM

An old discussion (started by me), but after over a year of exclusive git usageI still miss the auto add from AnkhSVN .

In cases where a project (.csproj) is being committed, it would be nice if any newly added non-staged files would at least cause a warning (as the project can't be built...).

I would certainly use the auto add option, as an extra file committed (and pushed) too early is much less harmful than a file not committed at all.

Oct 28, 2012 at 2:12 PM

The reason we hesitated to add file automatically is that sometimes files are created by tools, e.g. visual studio generates the project file upgrade logs and backups. File merge tool such as KDiff could create backup files and etc..

We suggest to explicitly select files in the Pending Changes Windows.

Feb 10, 2013 at 9:12 PM
I found it would be useful to have 'add' command in the right click menu as TortoiseGit. I have more than a hundred pending changes in my git and it's so hard to find the file I want to add/stage. Could you add the add menu in the next version of Git Source Control Provider? I am using v1.0.0