tj / tj/git-extras

git remove-merged-branches --remote

Open
#586 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Shell
Stars
18.1k
Forks
1.2k
Avg merge
5d 17h
Merged PRs (30d)
1

Description

It would be nice if there would be a cleanup command for remote branches which are merged.

I currently use this:

git branch -r --merged | grep -v master | sed 's/origin\///' | xargs -n 1 git push --delete origin

There is also https://gist.github.com/schacon/942899

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the existing remove-merged-branches command and its tests or command entry point. Add support for the --remote form so merged remote branches can be cleaned up like the command shown in the issue, then verify the relevant command tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
git, shell
Domain
cli
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.