git sed
Replace patterns in git-controlled files using sed.
Part of `git-extras`.
- Replace the specified text in the current repository:
git sed '{find_text}' '{replace_text}'
- Replace the specified text and then commit the resulting changes with a standard commit message:
git sed -c '{find_text}' '{replace_text}'
- Replace the specified text, using regular expressions:
git sed -f g '{find_text}' '{replace_text}'
- Replace a specific text in all files under a given directory:
git sed '{find_text}' '{replace_text}' -- {path/to/directory}
Copyright © 2014—present the tldr-pages team and contributors.
This work is licensed under the Creative Commons Attribution 4.0 International License (CC-BY).