Skip to content
This repository was archived by the owner on Nov 18, 2021. It is now read-only.
This repository was archived by the owner on Nov 18, 2021. It is now read-only.

Github website should support cherry-picking. #629

Open

Description

@mirek

Github website should support cherry-picking by going to branch, then cherry-pick, select one or more commits and apply.

Activity

  1. cirosantilli commented on Apr 1, 2016

    @cirosantilli
    Collaborator

    Even more powerful with :-) #200

  2. mirek commented on Apr 1, 2016

    @mirek
    Author

    @cirosantilli maybe but the beauty of cherry-pick is that, when can be cleanly applied, it doesn't require any extra UI elements.

  3. larsxschneider commented on Apr 1, 2016

    @larsxschneider

    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...

  4. mirek commented on Apr 1, 2016

    @mirek
    Author

    @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.

  5. TPS commented on Apr 27, 2016

    @TPS
    Collaborator
  6. jimis commented on Jan 4, 2017

    @jimis

    +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.

  7. mirekkukla commented on Mar 30, 2017

    @mirekkukla

    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.

  8. jimis commented on Sep 27, 2017

    @jimis
  9. burlen commented on Oct 11, 2017

    @burlen

    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.

  10. added
    parity
    on Feb 26, 2019
  11. MatthiasSchmalz commented on Mar 21, 2019

    @MatthiasSchmalz

    3rd anniversary day is coming close. Would be great to have this fixed that day.

  12. HelloKitty commented on Mar 25, 2019

    @HelloKitty

    Ridiculous that we still can't Cherry-Pick.

  13. fbolton commented on Jul 4, 2019

    @fbolton

    +1 for cherry-picking. It's a must-have.

  14. shubhamrajvanshi commented on Jul 18, 2019

    @shubhamrajvanshi
  15. 47 remaining items

  16. emmaviolet commented on Jun 22, 2021

    @emmaviolet

    Hopefully I didn't miss the boat on feedback here.

    @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!

  17. ricka commented on Jun 22, 2021

    @ricka

    @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.

  18. dougbu commented on Jun 23, 2021

    @dougbu

    @emmaviolet I think I missed a memo

    we've opened this up to all GitHub and Microsoft employees, but seeing very little use

    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 Unable to cherry-pick this commit because the selected branch is protected. message and wasn't able to recover by creating a new branch and opening a PR.

    Also hit Unable to cherry-pick this commit because there is a conflict with the selected branch. when targeting a different branch. Would have loved to be able to fix things up in the GitHub UI -- as I can after hitting some conflicts in PRs.

    Bottom line, awareness about and gaps in this feature are likely limiting GitHub and Microsoft usage too.

  19. emmaviolet commented on Jun 23, 2021

    @emmaviolet

    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).

  20. AraHaan commented on Jun 23, 2021

    @AraHaan

    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?

    How about right at the end of this but right before it shows the number of commits before (and counting) whatever the currently viewed commit is in this view?
    image

  21. AraHaan commented on Jun 23, 2021

    @AraHaan

    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 [<branch name>] without the < and >'s) and message inside the same as the original as well:

    image

    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)?

  22. ricka commented on Jun 23, 2021

    @ricka

    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.
    ADO:
    2021-06-23 09-49-24(1)(1)
    Gitlab:
    2021-06-23 09-51-34(1)

    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.

  23. PibePlayer commented on Jun 24, 2021

    @PibePlayer

    @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 😅

  24. dylanjt commented on Jun 29, 2021

    @dylanjt

    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 dev, even when a patch needs to make it to master outside release schedule. I can just cherry-pick the patch's commit to staging and then master (from my phone while I'm on an airplane!!), and the patch will deploy to production. That's a kind of fast and loose scenario perhaps, but I think shows how critical this feature is to teams taking advantage of other integrated Github solutions.

  25. emmaviolet commented on Jul 21, 2021

    @emmaviolet

    I have some slightly sad news on this, which is that after much team discussion, we decided to unship this feature yesterday.

    Why?
    In the six weeks since we shipped the feature to our staff, and to some of you, we saw very little usage. Less than 100 cherry-picks were successfully completed through the web UI.

    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?
    The team tackled many challenges in bringing this feature to production, and we'll be keeping some of that in the codebase. It will be much easier for another team to tackle this in the future through building off the work we've done.

    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 :-)

  26. JonKohler commented on Jul 21, 2021

    @JonKohler

    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 :(

  27. AraHaan commented on Jul 21, 2021

    @AraHaan

    I would see (or expect) major use of this feature by @dotnet and @microsoft if it was in public preview.

  28. LukeStephen commented on Jul 21, 2021

    @LukeStephen

    @emmaviolet I loved this feature, and used it daily, was it just removed from my account?

  29. dylanjt commented on Jul 21, 2021

    @dylanjt

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementmergeparitypull-requests

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions