Results for “search history”
Small, practical examples. Search by task or narrow things down below.
Locate a value in a sorted array
Java: Use Arrays.binarySearch only after establishing ascending order.
Java✓ Tested
Match a whole word
Linux Commands: Use grep -w to exclude a matching substring inside a longer word.
Linux Commands✓ Tested
Match any pattern from a file
Linux Commands: Use grep -F -f with one literal pattern per line.
Linux Commands✓ Tested
Print only the matching portions
Linux Commands: Use extended regex and -o to extract digit sequences.
Linux Commands✓ Tested
Read a complete commit message
Git: The B placeholder includes the subject and body without extra metadata.
Git✓ Tested
Read a file from the parent commit
Git: HEAD~1 names the first parent one generation before HEAD.
Git✓ Tested
Read commit subjects affecting one file
Git: Place the path after -- so Git limits history to the selected file.
Git✓ Tested
Read commit subjects from oldest to newest
Git: Reverse the normal newest-first history order.
Git✓ Tested
Read recent commit messages
View a compact history in newest-first order.
log✓ Tested
Show line numbers beside matches
Linux Commands: Use grep -n so a result identifies its position in the source file.
Linux Commands✓ Tested
Undo a commit with a new commit
Reverse a change while preserving shared history.
revert✓ Tested
Build a URL query string from values
JavaScript: URLSearchParams handles query escaping and repeated parameter appends.
JavaScript✓ Tested