-
Notifications
You must be signed in to change notification settings - Fork 129
Allow pull requests to be rebased from the UI #88
Comments
This comment has been minimized.
This comment has been minimized.
1 similar comment
👍 |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
1 similar comment
+1 |
+1 6 Another option which does not involve modifying history is There are 72 votes for that on GitLab's Uservoice tracker: http://feedback.gitlab.com/forums/176466-general/suggestions/5662794-provide-squash-option-when-merging-merge-requests Rebase was implemented on GitLab EE... http://feedback.gitlab.com/forums/176466-general/suggestions/4289653-rebase-merge-requests-in-the-web-ui (and has 92 votes) |
Agreed, |
I'd prefer modified but easy to understand history over a spaghetti of branches. |
+1 this breaks github web-only workflow by forcing the user to switch to CLI |
...and pull request doesn't pick up CLI rebase so the only option is to close the pull request as "unmerged" with the comment that it actually was rebased and merged from CLI. |
just close PR from the commit itself |
How? The pull request remains open and unmerged if I do this: git checkout pr-branch |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
So, GitHub recently added an "Update branch" button to PRs, but it sounds like it adds another merge commit instead of rebasing 😒 |
This comment has been minimized.
This comment has been minimized.
@tomek-brcm after |
This is more needed for those that open pull requests as they are much less
|
This comment has been minimized.
This comment has been minimized.
For me it boils down to the old Unix policy vs. mechanism design choice. Git is a great mechanism allowing us to choose a combination of merge, rebase, squash and fast-forward. It's also separate from the UI. The web UI mandates one, fixed policy, and policies tend to age very quickly. It might be time to upgrade the policy to match current user requirements. Thanks to the separation between mechanism and policy it shouldn't be too difficult. |
This would be a great feature. |
I'm waiting for this feature for a while now 👍 |
This comment has been minimized.
This comment has been minimized.
@dopplershift If you have an issue with merge commits cluttering up history, you should use a different tool to browse history. I tend to use It sounds like some weird OCD. |
Glad that works for you. It doesn't for me. Save your value judgements--I'm not asking you to do anything. |
@zougloub cannot endorse your point enough. Many hours wasted since this became available as someone decided to "oh but it was there seemed like the right thing to press". |
I'm writing this from 2023, this feature is not implemented yet and nobody knows why. |
Almost 6 years later. Has there even been an official response on this? |
This is an update to my comment above (from May 2017) Currently some CI services like Travis (but I don't think all of them) can be configured to run the tests twice - once on the PR branch itself and once on what would be the result of merging the PR to the base branch, so the problem that I described in the comment above (with merge buttons that update the target branch before running the CI tests on the result for some cases) can be mitigated somewhat if you use Travis and if you want to run the additional build (in practice I usually have to configure Travis to run the tests on both the original and the merged PR and not only on the merged PR because I need the tests on the actual branch anyway so it means running the build twice for every PR update which can sometimes take significant time). Currently in my GitHub guidelines I recommend not to use the "Update branch" button like @pzrq in this comment above, specifically to avoid the mess that @fpagnoux and @galulex show in their comments here. (The ProjectR looks interesting but I cannot give it access read and write all public and private repository data for the projects I work on.) |
Hello. I am in an hospital. But upstream's owner ask me to rebase changes before merge changes. I don't know how to do It via UI from my phone |
This feature can be added now via a GitHub action. Here are sources with instructions for the action: https://github.com/cirrus-actions/rebase. It will automatically rebase a PR on a |
@fkorotkov Looks very nice! But's insane there just aren't simple Just something simple like this. One button with pull-down would also be fine. |
This comment has been minimized.
This comment has been minimized.
If I disable --no-ff merges for PRs on my repository (which I do) then it stands to reason that I would not want the "Update Branch" button to add a merge commit. Can we at least get an administrative option that determines if the "Update Branch" button uses a |
The Autorebase GitHub App is similar to the previously mentioned GitHub Action but it can also be installed on public repos and it goes a bit further. Indeed, it doesn't stop to the one-time |
cries in 2021 and the 'Update Button' still isn't configurable to rebase instead of merge |
"cries" @repsejnworb ? Don't you mean celebration? I think Github is doing a fantastic job of keeping this anti-pattern out of it's workflow. Good on them from preventing the world from decending into a 1984 style dystopia, where force pushes are normal and history is what some developers want to see, rather than history being an accurate record of reality. |
@samthebest how in the world is rebasing a feature branch against |
@morficus Happy to help pal! Here is the wikipedia definition:
So
I guess the issue is that the users of the anti-pattern are not aware of the bad consequences of rebasing pushed branches, like it invoking The fundamental problem here is, developers often falsely identify themselves with their code. So they perceive a It's probably because some users find it hard to use Although the consequences are unlikely as bad as Big Brother from 1984, the principle is the same - a record of history should not be altered for the convenience of a single party, no matter how complex the history, and no matter how inconvenient for the single party. |
Rebasing a branch is not inherently an anti-pattern. But even if it were, the button should still be configurable to allow repo owners to specify The fact that the "Update branch" button forces |
This comment has been minimized.
This comment has been minimized.
@samthebest you should read the git documentation about how Instead of trying to quote a Wikipedia article about the Gang of Four, I invite you to explore the actual differences and valid use cases of using both |
@samthebest Nobody's forcing you to use rebase so why force everybody to avoid it? Secondly, there are genuine cases where the exact origin of the branch is of little importance. Most single-commit patches can easily be cherry-picked out of order. Git itself was modelled on Linux workflow. People were sending patches against the last released Linux version and maintainers applied those patches out of order on top of other, not yet released patches. It didn't kill Linux, did it? Remember the old "home taping is killing music" slogan? Your claim about the necessity of accurate history in git is equally false. Git hub is a tool. It's supposed to make my work easier, not harder. I prefer the convenience of somewhat inaccurate history over pain of branch spaghetti "no matter how complex the history, and no matter how inconvenient". Yes, there are people who like pain, good for them. I don't so I started to avoid github. Simple. |
its pretty disheartening to do a google search for something you thought would be so simple and see a thread that is now 8 years old that GitHub appears to be just completely ignoring. |
Forked from #2:
@glasser
The text was updated successfully, but these errors were encountered: