So You Think You Know git
src: So You Think You Know Git - FOSDEM 2024 - 2025-02-19
Slides: FOSDEM Git Talk
# Find the history of a file in specific lines without resorting to an IDE.
git blame -L 15,26 path/to/file
# Also works with git log.
git log -L 15,26:path/to/file
# Can even search the word.
git log -L :SearchWord:path/to/file
# Find the commits whose changes contain the searched word.
git log -S your_search_word -p
# For big repo, to accelerate git operations:
git maintenance start
# Will "cache" the commits history, so git log is faster in big repo.
git commit-graph write
# Accelerate git status operation on big repo:
git config core.fsmonitor true
git config core.untrackedcache true
git status # Git status goes brrr