Question 16
What is the safe way to force push?
Prefer --force-with-lease over --force. Avoid force pushes on shared branches to prevent accidental history loss.
Question 16
Prefer --force-with-lease over --force. Avoid force pushes on shared branches to prevent accidental history loss.
Question 17
Tags mark stable release points, enabling reproducible builds and easier rollback/version tracking.
Question 18
Hooks run checks like linting and tests before commit, preventing low-quality or broken code from entering history.
Question 19
Squashing combines multiple commits into one, useful for cleaning noisy feature branch history before merge.
Question 20
Locate a commit containing the file and restore it using git restore --source=<commit> <file> or git checkout <commit> -- <file>.