How To Find Commits With Code Containing a String
1 |
git log --pickaxe-regex -p --color-words -S "theSearchString" |
1 |
git log --pickaxe-regex -p --color-words -S "theSearchString" |
Output all lines in list.txt which don’t match any line in excluded.txt: grep -Fxv -f excluded.txt list.txt
I needed to take just the first occurrence of one or more spaces and turn that into a pipe symbol so as to create 2 fields for easy database import:
1 |
:%s/ \+/|/ |
The important thing to note is the inclusion of the backslash in front of the plus (+) sign. That prevents an irritating session of […]
[code] # filter blank lines grep -hv "^$" * # filter blank lines and comments grep -hv ‘^#’ * | grep -hv "^$" # filter blank lines, and comments, then count number of lines grep -hv ‘^#’ * | grep -hv "^$" | wc -l [/code] Note – using FreeBSD’s version of grep. The “-h” […]