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 rename a Git branch, including one already pushed?
Locally use git branch -m old new. For a pushed branch, push the new name, set its upstream, and delete the old name on the remote. Tell teammates, since their copies still track the old name.
BeginnerQuick answer1 min read