-
Notifications
You must be signed in to change notification settings - Fork 129
Github website should support cherry-picking. #629
Comments
Even more powerful with :-) #200 |
@cirosantilli maybe but the beauty of cherry-pick is that, when can be cleanly applied, it doesn't require any extra UI elements. |
Cherry picking should be used with care. If you cherry pick then you introduce the same change multiple times in your repo. If this change causes a merge conflict later on then you need to resolve the merge conflict multiple times... |
@larsxschneider sorry I don't see what you mean, anything can "cause merge conflicts later on". I'd like to see cherry-picking in github web ui, for commits that you choose quickly, only for commits that can be cleanly applied, with minimal UI (just picking a list of commits and applying). It's useful because sometimes there is a hot fix for other branches but you're currently working on a project locally, ie. your web app is running and you don't want to stop server, change branches, cherry pick commits and push that - in github ui you can do it very quickly with nice autocomplete/list of recent commits that are not merged yet etc. |
This was removed in 2012: https://github.com/blog/1091-spring-cleaning 🎩/T @klaustopher via #651 (comment) |
+1 for cherry-picking functionality. As a maintainer, every time I merge a pull request through the UI, I have to go in the code and cherry-pick the merged commits to the stable branches. This is an ugly manual process with lots of fragile copy-pasting. What I would expect from the UI: after having pressed the "merge" button in the pull request, a "cherry-pick individual commits" button appears with a pull-down menu "to branch xxxxxx". After the button is pressed, the commits are presented in a new window, with tick-boxes next to them: "select which commits you want to cherry-pick to branch xxxxxx". I'll be monitoring this thread. |
At a high level, there are legit use cases for cherry-picking commits. The ones on this thread are but a few of many. That's why git introduced the concept. Unless someone wants to argue the makers of github made a mistake by doing so, it's odd that this incredibly useful - and conceptually pretty simple - functionality would be removed from github. |
Gitlab support cherry-picking in the UI. @github where are you? |
Would like to see this. I'm in an airport, have only my cell, would like to use web interface to make a new branch, cherry pick a few commits off another branch and then merge these. |
3rd anniversary day is coming close. Would be great to have this fixed that day. |
Ridiculous that we still can't Cherry-Pick. |
+1 for cherry-picking. It's a must-have. |
This comment has been minimized.
This comment has been minimized.
Oh come on guys @github, do it already. We also want direct messaging back with privacy options. |
I thought this already existed but it's a rude shock that I can't create a branch and merge the cherry picked commits . I have to pull up a cli to bring this up . Atleast provide a CLI interface if not UI for cherry pick . |
+1 I am also finding this extremely annoying. |
Finally I found the one killer reason to switch to gitlab. |
+1 ... ridiculous that you added multi-line comments before just adding a simple UI button to cherry pick a PR to another branch. Literally just copy Gitlab, its a great feature. Have an intern do it. |
Common guys! Fix this already! |
Any progress? |
Ping, can we make this happen with GitHub Action, automatically make a cherry-pick PR based on a comment? Example: |
Glad to see that I am not alone thinking that... |
For squash merge, it's better to have a cherry-pick button on PR. |
This is why I use Gitlab, cant believe Github UI doesnt support cherry pick |
This comment has been minimized.
This comment has been minimized.
Also if you want automated cherry picking you could use labels for them like for example you got a pr on main that is a hotfix and you want to cherry pick that to the Add an 😆 At least it can be automated that way as well. And to merge the hotfix to main you could use mergify for that too, and have the users with write access that you want only to have merge ability to add an |
plz |
Hi folks, Emma from GitHub here. Thanks so much for all your feedback! We've been working on enabling cherry-picking through the web UI, but we'd still need to take on a bit more work to get it ready for public release. To help us figure out how to prioritise that, I wondered if some of you would be up for testing what we've built so far and letting us know what you think? |
Absolutely, I'm up for that, count us in |
Oh ye that would be perfect for those who maintain https://github.com/python/cpython as well. Also I would also love it if they could trigger a cherry pick on unmerged pr's too from within the PR interface as well on the web UI. At least add a button for PRs saying I think most of this would benefit the cpython devs and also deprecate the bot they use to backport changes to older python releases. |
Great - this should now be enabled for all those that 👍'd me. You can find the cherry-pick button on the top right of any commit page ( |
Dropped everything this morning to try this out and ran into a few walls, here's my feedback Things I like:
Things I don't like:
The expected behavior IMHO should be
Also, semi-related nit, if we're adding a cherry-pick button to the UI for the individual commit and not an entire PR, it would be nice to have a revert button in the UI for an individual commit too. This is something that gerrit has that is quite useful and just so happens to be directly next to the CP button in the PolyGerrit UI. This really hasn't been a huge issue in GitHub since the unit of focus was a PR and the revert button is there, but if we're drilling focus down to any random commit, having revert on a commit level would be nice too |
Hi @emmaviolet , Great ! working fine. Is there any feature to enable multiple commits selection for cherry-pick? Thanks. |
This is excellent feedback. Thanks so much! No ability yet for multiple commits selection @yassinesefi - hope we'll be able to address that as a future improvement, along with improvements to the merge conflict flow and commit message changes suggested by @JonKohler. The show-stopper we'll try to address soonest 🙌 |
Yes I would love to be able to test this!! Working on the go from my iPhone or iPad Pro, Would be great to be able to use this feature when I’m not at a proper desktop computer… |
I wish there was also an easy button on a branch as well to rebase that branch from another branch as well which basically then would take all commits to that branch and re-apply them on top of the changes from another branch from the web UI as well (at least on the commits tab in a PR would be nice) |
@emmaviolet Hopefully I didn't miss the boat on feedback here. The single commit cherry-pick works well. If people are needing one off single commit cherry-picks, I think this will work great, and works in a pinch for doing more than one. I really would like to see this be able to cherry-pick a whole PR/branch and create a new PR for review of the cherry-pick before "letting it rip." I agree with sentiments above that the typical workflows need automations to happen, and the best way to be consistent about that is with a new PR process for the cherry-pick. Being able to cherry-pick a whole existing, merged PR would help immensely for back-porting hot fixes and security releases to release branches. Really glad to see any work at all on this functionality. Thanks for taking input! |
I agree, also I know of many people who require to have cherry-pick PR's made for backports before the main change gets merged into their default branch so then they can then have their CI merge train their |
@ricka not at all! Thanks so much for sharing. And @AraHaan this is very helpful context. Just to share where we're at now, for full transparency. Our team has a (roughly) two week timebox on projects - we can pick up "quality of life" improvements more easily than other teams - but that's because we don't invest a ton of time in them. Suffices to say, we misjudged the commitment we were taking on here, and it spiralled to several times what we'd usually spend on a project. That's fine, but now we're pausing to make sure we move forward with enough signal - if we're going to spend another two months on it, it has to be really useful! 😸 Currently, it looks like we're not quite there. Alongside the folks in this thread, we've opened this up to all GitHub and Microsoft employees, but seeing very little use. And the additional work required to make this satisfy all the additional use cases is not nothing either (mostly thanks to many unhappy paths) 😅 So it's on pause for the time being - will stay dark-shipped for those on this thread, and we'll review in another couple of months to see whether we can pick this up again. Thanks so much for all the feedback and help so far. I will keep you posted! |
@emmaviolet Really love the transparency and honesty...please keep it up! And yes, I think there is a good bit of work involved to pull off this feature successfully. But if you are looking for inspiration within Microsoft, please reach out to the Azure DevOps team. They had an article up for a while (removed sometime this year unfortunately, but still accessible here that talks about how ADO implemented this and how the ADO team uses it for their "Release Flow". In fact, I'd wager that most internal folks that want this are just using ADO since it has had this functionality for some time. It's also something GitLab provides. I don't mean to say that any feature that other services offer is worth copying wholesale, but I do think this is a very very useful feature that people would love to see implemented in Github too and that you might have some folks within Microsoft that would evangelize it as well. |
@emmaviolet I think I missed a memo
This sentence was the first I heard the feature was available to me. I might have used it before because it avoids redoing squashes as we need to do w/ our "backport bot" (see https://github.com/dotnet/aspnetcore/blob/main/.github/workflows/backport.yml and https://github.com/dotnet/aspnetcore/tree/main/eng/actions/backport). Unfortunately, the first time I tried the feature, I hit the dreaded Also hit Bottom line, awareness about and gaps in this feature are likely limiting GitHub and Microsoft usage too. |
@dougbu I 100% agree with you. In general, I'd say, we are not great either at highlighting new features to existing users or at onboarding new users to existing users. We are working on it, but we're not there yet. This one hasn't even made it to our changelog, because it's not publicly shipped. Discoverability of this feature in particular is definitely a challenge, and almost certainly limiting its usage. I expected to navigate to it through looking at the commits in a given PR, for example (and that might, regardless, help more people to notice it, as that's a common flow). Is there anywhere else you'd expect to see it? Think we probably could invest a few more days to solve some of the discoverability challenges, but fixing the meatier issues without better signal is going to be a challenge (I do recognise the chicken-and-egg problem here, but it's still hard to justify). |
As for PR's I think a separate section from commits in the commits tab to cherry pick (I think it should also automatically create PR too when pressed and selected to a target branch and inside that make the title almost exactly match the original pr but add in However there is another issue, what if the PR has more than 1 commit? Will it cherry-pick all of them or just a single commit? If a single commit could it squash first then cherry-pick the squashed result (without sqausing it on the actual original PR)? |
Both Azure DevOps and Gitlab put this right next to the revert button on a merged PR, and I think that makes a lot of sense. This would need to work for multiple commits though. Additionally, I saw @AraHaan brought up cherry-pick before merge. I think you have to go deeper into context menus to make that happen in ADO and I'm not sure it is possible in Gitlab. |
@emmaviolet I'm excited to see this is going to be implemented in the web interface and I would love to be able to test it. I had an altercation with someone in the past because someone included the exact code I had written somewhere without any mention of me, and I hope this addition can fix some future troubles like that 😅 |
Having this implemented in the web interface would be a game-changer, especially for teams investing heavily in other Github integrated solutions. For instance, we use Actions for turnkey deployment to our cloud. Cherry-picking would give me the ability to still mandate all engineers PR against |
I have some slightly sad news on this, which is that after much team discussion, we decided to unship this feature yesterday. Why? We saw an equal number of failed cherry-pick attempts. About half of these failed due to merge conflicts, and we're not able to commit the time we'd need to solve that right now. We also looked at the number of users currently using this feature on Github Desktop, which introduced it some months ago at the same time as we did. Theirs is a much fuller-featured implementation, but still doesn't see as much use as we'd expected it too. Further, when we looked into the Desktop data, we saw that a significant proportion of their usage was from users cherry-picking multiple commits. That's another use case that we don't quite have the capacity to address. Finally, we looked into the discoverability issues highlighted in this thread. We think we made a misstep here, and probably should have tackled this issue sooner, but we don't think that enhancing the discoverability of this feature can meaningfully improve usage in the absence of other more substantive fixes. What next? For now, though, we've unshipped the frontend code, and are focusing our energies on other projects. Hopefully many of those will benefit you too :-) |
I would bet some dollars that if it was shipped wider and publically announced, you'd see more usage. That plus a weeeeeee bit more polish from my comments and the ones immediately between mine and yours and we'd be completely golden (like cherry picking entire PRs / multiple commits at once, etc). Just having CP on a single atomic commit is like a 10th of the battle :( |
I would see (or expect) major use of this feature by @dotnet and @microsoft if it was in public preview. |
@emmaviolet I loved this feature, and used it daily, was it just removed from my account? |
While I appreciate the reasoning behind this decision I resoundingly disagree. @JonKohler made some excellent points about increasing visibility, and beyond that it is sad to see GitHub abandoning its power users in favor of a (in my opinion misinformed) survey approach. I really hope this criticism makes it to the decision makers involved. |
Github website should support cherry-picking by going to branch, then cherry-pick, select one or more commits and apply.
The text was updated successfully, but these errors were encountered: