Interview Q&A / Git & GitHub
Git & GitHub interview questions
Branching, merge vs rebase, resolving conflicts and pull requests, the way teams actually work.
Prefer rapid revision? Practise Git & GitHub short interview answers →
- How do you work from an old tag, and can you move or delete a tag?
Checking out a tag puts you in detached HEAD, so create a branch from it with git switch -c fix v1.0. You can delete a tag with git tag -d, but moving a published tag confuses others and should be avoided.
IntermediateQuick answer1 min read - What is a detached HEAD, and how do you get out of it?
Detached HEAD means HEAD points directly at a commit instead of a branch, for example after checking out a tag or an old hash. New commits there belong to no branch and can be lost unless you create a branch.
IntermediateQuick answer1 min read