Alberto
Alberto

Reputation: 12949

mark branch as closed/archived github

I have a pretty big project on Github with several other contributors, and we have reached the point where we have a list of braches that we no longer can "manage" (i mean that every time i do git branch the list way too long)

Most of those branches are now useless since they are something like "fix-xxx" so i would like to "close" them, so that i can still see them on the Network tab, but they will be something like archived

Are there something like this o i have to delete them?

Upvotes: 2

Views: 3656

Answers (2)

Bill Tarbell
Bill Tarbell

Reputation: 5234

One possible option is to rename the branch to archive/branchName. Git remote will then update any associated entities (PRs, etc) and warn any users attempting to make a push to the former name.

SourceTree will display all branches with a similar prefix (archive/) in their own folder within the branch list. This way you end up with a folder dedicated to just the archived branches.

Upvotes: 3

VonC
VonC

Reputation: 1327224

Considering there is no "lock/obsolete" attribute that would make those branches invisible, deleting them is the normal course of action.

If you have to keep a reference to them, I would create a separate repository where I would push those branch.
Then I would delete the same branches in the original repository.

Upvotes: 1

Related Questions