You need to start working on a bug fix. Walk me through the exact git commands you would use to create a new branch for this fix and switch to it.
If you run git checkout -b feature/login and then realize you made a typo in the branch name, how would you correct it without losing your work?
While implementing a new feature, you created a branch and later discovered that the base branch had new commits. How would you update your branch, and what considerations affect whether you rebase or merge?
During a code review, a teammate points out that your branch name doesn't follow the team's naming convention. How would you rename the branch locally and on the remote without disrupting others?
Our repository has hundreds of active feature branches. Describe how you would manage branch creation and switching to minimize merge conflicts and keep CI pipelines efficient.
We need to enforce a policy where only certain branches can be pushed to production. How would you incorporate branch creation and switching into a workflow that integrates protected branches and automated checks?
Our organization is moving from a trunk‑based development model to a long‑living release‑branch strategy across multiple teams. Explain how you would redesign the branching and switching process, tooling, and documentation to support this migration at scale.
When scaling a monorepo with thousands of developers, what branching conventions and automation would you put in place to ensure that creating and switching branches remains fast and doesn't cause repository bloat?