How do `git switch --detach` and `git checkout <tag>` differ from checking out a branch for releases?
IntermediateConceptHooks, submodules, LFS and signing
Answer
<details> <summary><b>Answer</b></summary>
A tag or SHA checkout gives a detached HEAD at an immutable point, which is exactly what you want for building a release reproducibly. Branch checkouts move over time. Release pipelines should build from a tag or SHA.
More on Hooks, submodules, LFS and signing
What are Git hooks and where do they live?BeginnerHow do you share hooks with a team, given `.git/hooks` is not committed?IntermediateWhat does the `commit-msg` hook receive and what is it good for?IntermediateWhat do `pre-receive` and `update` hooks do and how do they differ?AdvancedWhat is a Git submodule?BeginnerWhy do submodules confuse people and what are the common pitfalls?Intermediate