Skip to content

Feature Request: Add support for --update-refs option in rebase #354

@bernarduh

Description

@bernarduh

Description

Add support for git's --update-refs (or -u) option when performing interactive rebases in edamagit.

Background

The --update-refs flag was added to git rebase in Git 2.38 (October 2022). It automatically updates any branches that point to commits being rebased, which is extremely helpful when working with stacked branches or dependent feature branches.

Use Case

When working with multiple feature branches built on top of each other:

main
  └─ feature-A
      └─ feature-B
          └─ feature-C

If you rebase feature-A, without --update-refs, branches feature-B and feature-C still point to the old commits. With --update-refs, git automatically updates all dependent branches to point to the rebased commits.

Proposed Implementation

  • Add a toggle option in the rebase transient menu (similar to other rebase flags)
  • Append --update-refs to the git rebase command when enabled
  • Possibly default to enabled if rebase.updateRefs is set in git config

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions