Skip to content

Instantly share code, notes, and snippets.

@btaitelb
Created December 3, 2011 00:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save btaitelb/1425578 to your computer and use it in GitHub Desktop.
Save btaitelb/1425578 to your computer and use it in GitHub Desktop.
git-sed
sed -e 's/search for/replace/g' -i .orig $(git grep --name-only 'search for' | xargs)
@gergoerdi
Copy link

Instead of "git grep "foo" | cut -d ':' -f 1 | uniq", you can just use "git grep --name-only "foo""

@btaitelb
Copy link
Author

Thanks, this is much better and I've updated the gist.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment