TIL how to remove every console.log added since I branched out of master
May 01, 2020 —
Cédric Dekimpe
git diff master -G "console.log" --name-only | xargs sed -i '/console.log/d'
git diff masterdisplay what has changed in the local branch against master-G "console.log"will search for « console.log » within the changes--name-onlywill output only the filenames of the changed files| xargs sedwill send the said output to sed-i '/console.log/d'will apply thed[elete] command the all lines matching console.log