Critical situation in removing a local branch
问题 I using the following command to remove a local branch with force delete option: $ git branch -D <branch_name> My question is, If I delete a local branch that had an upstream set and then do a normal push, it won't delete the remote branch right? What should I do in this situation? [ NOTE ]: "-D" is force delete option. I want delete the local branch and keep the remote branch in origin. 回答1: git will only delete your local branch, please keep in mind that local and remote branches actually