How can I exclude pull requests from git mirror clone

后端 未结 1 668
误落风尘
误落风尘 2021-02-14 12:11

I want to mirror clone a Bitbucket Repository to another Bitbucket Repository. I manage this with a shell script, which does the following:

git clone --mirror &l         


        
相关标签:
1条回答
  • 2021-02-14 12:54

    Thanks to Ivan.

    His command solved my Problem. I only had to add the "-r" parameter to xargs to react on empty greps:

    git show-ref | cut -d' ' -f2 | grep 'pull-request' | xargs -r -L1 git update-ref -d
    
    0 讨论(0)
提交回复
热议问题