Re: protect .git folder/files from grep/sed commands

2019-03-15 Thread SZEDER Gábor
On Sat, Mar 16, 2019 at 01:37:39AM +, Dimitri Joukoff wrote: > When performing global changes in a project/tree using a command like: > > grep -r "search" | xargs -I {} sed -i '' s/search/replace/g > > there exists the possibility that this command will alter data in .git > folder. Using GNU

protect .git folder/files from grep/sed commands

2019-03-15 Thread Dimitri Joukoff
When performing global changes in a project/tree using a command like: grep -r "search" | xargs -I {} sed -i '' s/search/replace/g there exists the possibility that this command will alter data in .git folder. Using GNU grep, it is possible to use --exclude '/.*"' to avoid the .git folder, but t