This comes often handy for me for example if I want to rename a class name and apply it everywhere:
$ sed -i 's/Shard/Card/g' $(git ls-files)
Simply put, the part in the parenthesis extracts all filenames under source control for the current repo. Those get applied as target files for an in-place
To make sure that there are no Shards left:
$ git grep 'Shard'
EDIT: It should be noted that it's a good idea to test that you broke nothing, as well as verifying that you did not change anything appropriate (check the diff).
EDIT 2: Shorter and branch-agnostic, à la @mlafeldt !