-
-
Notifications
You must be signed in to change notification settings - Fork 83
Open
Description
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-refsto the git rebase command when enabled - Possibly default to enabled if
rebase.updateRefsis set in git config
References
- Git documentation: https://git-scm.com/docs/git-rebase\#Documentation/git-rebase.txt---update-refs
- Git config option:
rebase.updateRefs
bezbac
Metadata
Metadata
Assignees
Labels
No labels