feat(git): Add gmff
, gupum
, and grbum
for working with upstream
remotes
#11428
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Standards checklist:
Changes:
gmff
forgit merge --ff-only
gupum
forgit pull --rebase upstream $(git_main_branch)
(analogously to already existinggupom
)grbum
forgit rebase upstream $(git_main_branch)
(analogously to already existinggrbom
)Other comments:
The first change for
--ff-only
merge is similar to the abandoned #8119.The need behind these aliases stem from workflows where a dedicated central repository enforces things like linear history, but the conventional workflow involves the user itself having a fork where they exert total control. From my personal perspective, the project in question is LLVM. In my local fork, I go wild with branches and merge commits, but the official upstream does not use pull requests and mandates a strict linear history, so there is often the need to squash and rebase my local contents against the upstream cleanly often before creating patches. As such, I expect these commands to be generally useful for project of similar size and rules, such as Linux.
Two of the aliases in question just duplicate existing ones but embed the conventional
upstream
repository name instead oforigin
. Other aliases whereupstream
is used are already in the codebase of the plugin.I've been having
git ffmerge
, here proposed asgmff
as an alias for close to a decade now (the versioning of the Dotfiles was not happening when I already had some of the personal aliases, long before I knew Zsh even existed!) and I can track downgit rbum
, here proposed asgrbum
to roundabout 4.5 years ago, when I started doing major contributions to upstream LLVM as opposed to working on an in-house downstream derivative.