Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(git): Add gmff, gupum, and grbum for working with upstream remotes #11428

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

whisperity
Copy link

Standards checklist:

  • The PR title is descriptive.
  • The PR doesn't replicate another PR which is already open.
  • I have read the contribution guide and followed all the instructions.
  • The code follows the code style guide detailed in the wiki.
  • The code is mine, or it's from somewhere with an MIT-compatible license.
  • The code is efficient, to the best of my ability, and does not waste computer resources.
  • The code is stable, and I have tested it myself to the best of my abilities.
  • If the code introduces new aliases, I provide a valid use case for all plugin users below.

Changes:

  • Add gmff for git merge --ff-only
  • Add gupum for git pull --rebase upstream $(git_main_branch) (analogously to already existing gupom)
  • Add grbum for git rebase upstream $(git_main_branch) (analogously to already existing grbom)

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 of origin. Other aliases where upstream is used are already in the codebase of the plugin.

I've been having git ffmerge, here proposed as gmff 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 down git rbum, here proposed as grbum 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.

@ohmyzsh ohmyzsh bot added Area: plugin Issue or PR related to a plugin Topic: alias Pull Request or issue regarding aliases Type: documentation Documentation issue or Pull Request labels Jan 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: plugin Issue or PR related to a plugin Topic: alias Pull Request or issue regarding aliases Type: documentation Documentation issue or Pull Request
Projects
Status: Backlog
Development

Successfully merging this pull request may close these issues.

None yet

1 participant