tj / tj/git-extras

Feature request: Rebase all/multiple branches on top of master

Open
#682 1 comment 11 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

When merging branches with the --no-ff switch, the git delete-merged-branches command does not work because no merge commit was created.

As a consequence, I have to go through all my branches, rebase them on master, before being able to clean up:

cd $(git root)
git pull
git checkout branch1
git rebase master
git checkout branch2
git rebase master
git checkout master
git delete-merged-branches

I would envision an command working as follow:
git rebase-all would rebase all the branches on top of master
git rebase-all branch1 branch2 would rebase branch1 and branch2 on top of master

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 reading the existing git-delete-merged-branches command and the repository's other Git utility entry points. Reproduce the branch workflow described in the issue, then define how git rebase-all handles all branches versus named branches and what happens on rebase conflicts. It is done when both command forms rebase the requested branches onto master and the cleanup workflow works afterward.

Written by the indexing model from the issue text.

Assessment

Tech stack
git, shell
Domain
cli, tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 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.