How to delete remote branch (e.g. Github) from command line?

This question already has an answer here:

  • How do I delete a Git branch both locally and remotely? 39 answers

  • As with every git server:

    $ git push github :<BRANCH_NAME>
    

    or:

    $ git push github --delete <BRANCH_NAME>
    

    Example:

    $ git push github --delete test
    

    Local Branch

    git branch -d local_branch
    

    Remote Branch

    git push origin --delete remote_branch
    

    Use this command:

    git push github :test
    

    Read "push nothing as refname test on github remote"

    链接地址: http://www.djcxy.com/p/998.html

    上一篇: Erlang管理员重新启动与下降主机连接的策略

    下一篇: 如何从命令行删除远程分支(例如Github)?