The Git Add Files To Repository action allows you to add the file contents of new or modified files to the index for inclusion in the next commit. This action is a wrapper for the git command line. For more information on the use and options for this action, refer to the git add command line documentation

In the Local repository field of the Add Files tab, enter the path to a local Git working folder for the local repository that you want to add the files to. 

You can then either:

  • add a list of files/folders to be added to the repository,
  • enter the path to a Pathspec file containing a list of files to add,
  • select All to add all files in the working folder
  • or select Update to update modified files in the working folder which already exist in the index.

When adding files/folders, ensure each entry is placed on a new line. The asterisk can be used as a wildcard character, which saves having to manually enter 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.*

Update - This option allows you to only match against files listed in the index. It 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.

The Add Options tab allows you to specify some additional options to pass to the Git Add command line.

No all - Add new files that are unknown to the index and files which are modified in the working folder, but ignore any files that have been removed from the working folder. 

Renormalize - Apply the "clean" process freshly to all tracked files to forcibly add them again to the index. 

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.

Verbose - Show verbose output from Git command line.

No warn embedded repo - By default, git add will warn when adding an embedded repository to the index without using git submodule add to create an entry in .gitmodules. This option will suppress the warning (e.g., if you are manually performing operations on submodules).

Override executable bit of the added files - Update the executable bit for file is the index. Note that the files on disk are left unchanged.

For more information on adding files to git, see the git-add command line documentation.

  • No labels