Cheatsheet: Difference between revisions
Jump to navigation
Jump to search
Adamcolton (talk | contribs) Created page with "== Git == undo commit $ git commit -m "Something terribly misguided" $ git reset HEAD~ << edit files as necessary >> $ git add ... $ git commit -c ORIG_HEAD find in..." |
Adamcolton (talk | contribs) No edit summary |
||
| Line 9: | Line 9: | ||
find in history | find in history | ||
git log -S'the line from your file' -- path/to/your/file.txt | git log -S'the line from your file' -- path/to/your/file.txt | ||
== Grep == | |||
grep -lr --include \*.[EXT] --exclude \*[TAIL] "[SEARCH1]" ./ | xargs grep -n [SEARCH2] | |||
Revision as of 15:32, 30 October 2017
Git
undo commit
$ git commit -m "Something terribly misguided" $ git reset HEAD~ << edit files as necessary >> $ git add ... $ git commit -c ORIG_HEAD
find in history
git log -S'the line from your file' -- path/to/your/file.txt
Grep
grep -lr --include \*.[EXT] --exclude \*[TAIL] "[SEARCH1]" ./ | xargs grep -n [SEARCH2]