Git Add Files To Repository

   

The Git Add Files action allows you to add the file contents of new or modified files to the index for inclusion of the next commit.

From the Git Repository tab select the local repository that you want to add the files to. If you have already specified a default local repository via Tools > Options > Git, then you can enable the Use defaults option to use this repository. Otherwise,  you can override the default local repository by enabling the Override defaults option and specifying an alternative in the field provided.

Git_GitRepository

Once the local repository has been selected , switch to the Add Files tab and select the files and directories that you want to add. Ensure each entry is placed on a new line. The asterisk can also be used as a wildcard character, which saves having to manually add every file that you want to add.

For example:

To add every file within the repository directory you can use *.*

To add every file of a particular extension (in this example .txt) *.txt

To add files where names contain certain text (in this example "_v2") *_v2.*

 

Git_AddFiles

 

There are also a number of options that can be executed with this action.

Verbose - Verbose output from Git.

Force - Add files that are otherwise ignored.

Ignore Errors - If an error occurs while indexing a file, ignore the error and continue to add the remainder of the files rather than ceasing on error. This will still result in the action failing.

Refresh - Only refresh the stat information in the index rather than adding the file.

Intent To Add - Add the path to the index without actually adding file content.

Update - This option allows you to only match against files listed in the index. This option also allows you to leave the file list blank in which case all tracked files will be updated in the index. Hence including a file in the file list which is currently untracked will have no effect as it will be ignored.

All - This option is similar to the Update except that it matches against both the working tree and the index. This option also allows you to leave the file list blank in which case all new files will be staged, modified files will be updated and files no longer in the working tree will be removed.

For more information on adding files to git, see: git add