E
E
Eugene2015-12-09 15:54:20
git
Eugene, 2015-12-09 15:54:20

How do you monitor the "health" of your Git repositories?

Hello.
Tell us how to monitor the "health" of Git repositories? Specifically interested in the possibility of tracking the "aging" of the branches. For more details:
let's say there are 10 repositories and a team of 10 developers. Each task is done by the developer in a separate branch. In addition, each repository (with some additions) uses the git-flow principle.
Voot.
Since developers are creative people, they forget to delete their branches in which they did tasks. Because of this, the repository is expanding, and the software for conducting reviews (which constantly monitors the repositories) begins to slowly bend.
Is there a way to automatically track such "rotten" branches in the repository (while excluding branches like master, develop, feture-*)? We use GitLab as an admin panel for the repositories, we couldn’t understand at a glance whether it is possible to turn such a feint with our ears using its API.
Tell me, do you have such a problem? And if so, how do you solve it?
Thank you.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
F
FoxInSox, 2015-12-09
@FoxInSox

The "old" or "not old" branch is known only to the developer, i.e. even if the feature is closed, then the branch may be needed for some other needs, so it is unlikely that it will be possible to automate the removal somehow. This is a problem for developers, and they need to be educated, for example, to close features by deleting the remote branch .
The only thing you can run at the end of the week is a script that would check the number of branches not deleted by the developer, and if there are more than 5 of them, then send him something like "If unnecessary branches are not deleted, you will lose 10% of your salary next month" .

V
Viktor Login, 2015-12-09
@BATAZOR

We also have GitLab and git flow, for working branches we add the [WIP] prefix, such a branch cannot be merged (GitLab marks it differently). master, testing is protected. Everything that is not protected, WIP or merge is removed.
Adding code occurs through merge-request, when accepting a merge-request, we check the 'delete branch after merging' checkbox and that's it.

P
Poaiwrrt, 2020-11-07
@Poaiwrrt

As for the pain in the stomach of the medicine, you could read everything here and find suitable information that will be really useful for you, but here, as they say, see everything for yourself.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question