Skip to content

Instantly share code, notes, and snippets.

@pesterhazy
pesterhazy / git xargs.md
Last active November 25, 2022 09:11
git xargs: execute utility on files under source control

git xargs: execute utility on files in repository

Provides a new git command, git xargs, that runs an arbitrary shell command on all files under source control. Optionally you can specify a pathspec (such as a subpath or a glob expression), restricting the operation to a subset of the repository files.

As git xargs delegates the work to xargs(1), it supports all options provided by the version of xargs installed on your system.

Installation