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 can you turn a stash into its own branch?
Run git stash branch new-name. Git creates the branch at the commit where you stashed, applies the stash there, and drops it, which avoids conflicts if the original branch has moved on.
IntermediateQuick answer1 min read - What are the risks of relying on git stash?
Stashes are local, easy to forget, and git stash drop or clear removes them. They are not on GitHub, so a disk failure loses them. For anything you care about, commit on a temporary branch instead.
IntermediateQuick answer1 min read