Vaclav Kosar's face photo

Vaclav Kosar

Vaclav Kosar is a senior software developer. This blog is focused on interesting technology, tips and news.

Obsolete Branch Remover

22 Jul 2016

Having many branches left behind, abandoned, never deleted? How do you deal with them? We had same problem and I developed a automated DevOps solution.

Obsolete branch occurs, when dev doesn’t delete branch and forgets about it. Obviously simplest obsolete branches to remove are the merged branches. Those doesn’t contain any commits, that would be missing on develop or master branch. Unmerged branches contain extra commits both in repository and on author’s local. If author doesn’t care about a branch for long then the commits are probably not very valuable. Thus repository should not be burdened with such obsolete branches.

Using above reasoning I’ve provided git-obsolete-branch-removal to automatically remove obsolete branches. And we were happy ever after.

Subscribe: Twitter , Facebook , RSS ,
Share on: Twitter , Facebook , Google+ , LinkedIn , Reddit .

Report any trackers to [email protected].