LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

git-sed

Find and replace across tracked files

TLDR

Find and replace in tracked files
$ git sed "[old]" "[new]"
copy
Replace with flags
$ git sed -f [g] "[pattern]" "[replacement]"
copy

SYNOPSIS

git sed [options] pattern replacement

DESCRIPTION

git sed runs a find-and-replace operation across all Git-tracked files. Part of git-extras, it uses sed internally but limits changes to files under version control, avoiding untracked or ignored files.

PARAMETERS

-f flags

Sed flags.
-c
Commit changes.

SEE ALSO

sed(1), git-grep(1), git-extras(1)

Copied to clipboard
Kai