A
A
Automat2017-10-25 13:43:47
git
Automat, 2017-10-25 13:43:47

How to search for a line/word in all files before a commit?

Created a branch, filed additional. functional, ready to commit and push, status shows that there are 10 changed files.
Question: is it possible to somehow search all these modified files for the desired combination of characters / word? For example, I want to make sure that I removed echo and var_dump everywhere after debugging.
For example, I entered var_dump if the results are 0, then I removed everything.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
B
Boris Korobkov, 2017-10-25
@nomotrack

git diff | grep "var_dump" | wc -l
PS For debugging, you should not use var_dump, but https://xdebug.org/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question