Как я могу заархивировать ответвления мерзавца?

Возможно, самые полезные дополнительные методы я записал и использовал, здесь:

http://www.codeproject.com/KB/cs/fun-with-cs-extensions.aspx?msg=2838918#xx2838918xx

279
задан dan-manges 20 August 2009 в 04:49
поделиться

2 ответа

I believe the proper way to do this is to tag the branch. If you delete the branch after you have tagged it then you've effectively kept the branch around but it won't clutter your branch list.

If you need to go back to the branch just check out the tag. It will effectively restore the branch from the tag.

To archive and delete the branch:

git tag archive/<branchname> <branchname>
git branch -d <branchname>

To restore the branch some time later:

git checkout -b <branchname> archive/<branchname>

The history of the branch will be preserved exactly as it was when you tagged it.

365
ответ дан 23 November 2019 в 02:02
поделиться

Вы можете заархивировать ветки в другом репозитории. Не так элегантно, но я бы сказал, что это жизнеспособная альтернатива.

git push git://yourthing.com/myproject-archive-branches.git yourbranch
git branch -d yourbranch
18
ответ дан 23 November 2019 в 02:02
поделиться
Другие вопросы по тегам:

Похожие вопросы: