Git alias to delete remote branch

前端 未结 2 1197
南方客
南方客 2021-02-15 15:55

I am trying to make an alias to delete a remote branch but I can\'t seem to get it, here is my latest attempt that I really expected to work but no luck.

rmrb =          


        
2条回答
  •  感情败类
    2021-02-15 16:29

    Maybe a shell function would be easier?

    [alias]
        rmrb = "!f() { git push origin :$1; }; f"
    

    Or you can use sh:

    [alias]
       rmrb = !sh -c 'git push origin :$1' -
    

提交回复
热议问题