假设我们在 “contact-form” 分支上的工作已经完成了。并且我们也已经把最终的改动整合到了 “master” 分支。现在我们就不再需要这个分支了。把它删除掉吧:
$ git branch -d contact-form
为了保持一致,我们也有必要删除它所对应的远程分支。附加上一个 “-r” 参数就可以了:
$ git branch -dr origin/contact-form
Try Tower "Pro" for 30 days without limitations!
Please check your email to confirm
We'll pick 4 winners every month who share this post!Follow @gittower to be notified if you win!
Sign up below and use Tower "Pro" for 30 days without limitations!
You'll find the most important commands on the front and helpful best practice tips on the back. Over 100,000 developers have downloaded it to make Git a little bit easier.