The command of delete remote branch of Git

If you want to delete a branch forever, you should do

git push [remote name] :[branch name]

The `branch` command also has delete option. As follow:

git branch -r -d [branch name]
This command look like to delete a remote branch. But it is not. It just delete an remote tracking branch. You can add again that tracking a remote branch when you needed.

留言

熱門文章