The Git Remove Files action allows you to remove files and directories from a repository.

From the Git Repository tab select the location of the local repository that you want to remove content from.

Switch to the Remove Files tab to specify the files and/or directories to remove from the repository. Use the Add Files button and the Add Folders button to select the content to be removed from the repository. Place each entry on a new line. You can also use the asterisk wildcard to remove files.  

For example:

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

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

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

The Remove Files tab also provides a number of options that can be executed:

Force - Override the up-to-date check.

Cached - Use this option to unstage files by removing them from the index, without actually removing files from the working tree.

Ignore Unmatch - This option means that the action will pass even if no files are matched for removal. This also disables the validity checking that each file/directory is subjected to before being flagged for removal.

Quiet - Suppress output from Git.

Recursive - Allow a recursive removal by providing a directory.

For more information on removing files in git, see:

  • No labels