Interview Prep/Git & GitHub/Hooks, submodules, LFS and signing

What are the `.gitignore` pattern rules for `*`, `**`, `/` and `!`?

IntermediateConceptHooks, submodules, LFS and signing
Answer

* matches within a path segment, ** matches across directories, a leading / anchors to the repo root, a trailing / matches directories only, ! re-includes a path (not possible if a parent directory is ignored). Last match wins.

/build/
*.log
!important.log
**/temp/
All Git & GitHub questions Roadmap: Git & GitHub

More on Hooks, submodules, LFS and signing