Git delete local branch code

Problem description: During the development process, switch to a local branch, and then pull the code of the remote branch, then the development tool will report many strange errors

Solution:

  1. Enter the root directory of this project through CMD, and then use the following command to force switch to another branch

git checkout -f develop

2. Use the following command to force delete another local branch

删除本地分支:git branch -d hotfix-0.3
强制删除本地分支:git branch -D hotfix-0.3

Pull the latest remote branch code to the local for development

Guess you like

Origin blog.csdn.net/y_bccl27/article/details/114533116
Recommended