How can I archive git branches?

后端 未结 11 2173
無奈伤痛
無奈伤痛 2020-11-27 09:00

I have some old branches in my git repository that are no longer under active development. I would like to archive the branches so that they don\'t show up by default when r

11条回答
  •  失恋的感觉
    2020-11-27 09:39

    Extending Steve's answer to reflect the changes on the remote, I did

     git tag archive/ 
     git branch -D 
     git branch -d -r origin/
     git push --tags
     git push origin :
    

    To restore from the remote, see this question.

提交回复
热议问题