How to delete a git remote branch

Source: Internet
Author: User

1, in the development process, everyone in the remote creation of many branches, some are useless, how to delete, you can refer to the following methods.

If you no longer need a remote branch, such as taking a feature and merging it into a remote master branch (or any other storage
Stable code place), you can use this very unreasonable syntax to delete it: git push [remote name]: [branch name]. If you want to delete the server,

In addition to the Serverfix branch, run the following command:

git push origin:serverfixto [email protected]:schacon/simplegit.git-[deleted] Serverfix

Boom! The branch on the server is gone. You'd better pay special attention to this page, because you will definitely use that command, and you will probably forget it.
Grammar. There is a convenient way to memorize this command: Remember the git push [remote name] [local branch]:[remote branch] syntax we have seen recently, as
If the [local branch] is omitted, it is said to "extract the blanks here and turn it into a [remote branch]".

Note the space after Origin

Article Source: http://my.oschina.net/tsingxu/blog/84601

How to delete a git remote branch

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.