You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 18, 2021. It is now read-only.
Repository navigation
This repository was archived by the owner on Nov 18, 2021. It is now read-only.
Github website should support cherry-picking. #629
Github website should support cherry-picking by going to branch, then cherry-pick, select one or more commits and apply.
Reacted by Ciro Santilli (三西猴) OurBigBook.com sponsor me: cirosantilli.com/sponsor, opinions my own 2020冠状病毒审查 ,2020郝海东 ,2018新疆改造中心,1989六四事件,1999法轮功 ,2019 996.ICU, 2018包子露宪,2015 709大抓捕,2015巴拿马文件 邓家贵,2017低端人口,2008西藏骚乱<script>alert(1)</script>, Jacob Weisz, Kevin Yap, Alex Zenla, Mirek Rusin, Patrick Gaskin, TPS, Jonathan Hettwer, Endre Kovács, Dan Bovey and 446 more
Reacted by Lars Schneider
Reacted by Martin, Diego Rodriguez, Eddie Chen, AraHaan, Oleksii Furaiev and braindevices
Reacted by Martin, Diego Rodriguez, Eddie Chen, Alex Woods, AraHaan, Oleksii Furaiev and braindevices
Reacted by Martin, Teo Sarca, Karthik, Diego Rodriguez, Joydeep Roychowdhury, Eddie Chen, Andrii.Gryshchenko, Wolfgang Anger, Alex Woods, Yash Bhutwala and 10 more
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.
Reacted by Endre Kovács, TPS, Josenivaldo Benito Junior, Mirek Kukla, Michael Ovchinnikov, MAVAJ SUN CO, UnKnoWn, David Craven, Natalie Nuno, Marc Miltenberger and 5 more
+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.
Reacted by Bryan Russett, Milos Marinkovic, Alex Curylo, Public Happiness Andy, Volodymyr Barna, Bo Thomsen, Lorenzo Rossi, Jason Cross, Greg Netsas, Ole Herman Schumacher Elgesem and 12 more
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.
Reacted by Bryan Russett, Sec, Alex Curylo, Mattia Spinelli, Timothy Cardenas, Yair Chuchem, Ole Herman Schumacher Elgesem, ૮༼⚆︿⚆༽つ, Robert Starsi, UnKnoWn and 3 more
Reacted by Ole Herman Schumacher Elgesem, digitalgutenberg, Ifeoma Okereke, ૮༼⚆︿⚆༽つ, Pedro de Carvalho, Markus Buhatem Koch, Dayle, pspl-ravikumar, Kazutaka KAMIYA, Alex Vernet and 19 more
Reacted by ૮༼⚆︿⚆༽つ, Thomas Rijsewijk, Damian Fuentes, Yong, Tikotik, Asiel Leal Celdeiro and AraHaan
Reacted by Foxy Lady, Benjamin McIntire, Jaeyong Han and AraHaan
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.
Reacted by ૮༼⚆︿⚆༽つ, Drazen Bjelovuk, Pedro de Carvalho, N.S.Devaraj, Valerij Timofeev, MAVAJ SUN CO, Lucas de Assis Rosa, Guy Margalit, Jim Boulter, Damian Fuentes and 14 more
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!
Reacted by TPS, AraHaan, Jack Sampson and Mateo Pidal
@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.
Reacted by Jack Sampson, AraHaan and Rodrigo Faria
Reacted by Emma Gabriel, AraHaan and Rodrigo Faria
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.
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).
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?
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:
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.
ADO:
Gitlab:
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 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.
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 :-)
Reacted by TPS, berlin4apk, Dylan Taylor, AraHaan, Niccolò Belli, Rodrigo Faria and Jetro Lauha
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 :(
Reacted by Rodrigo Faria, AraHaan, TPS, berlin4apk, Dylan Taylor, Patrick and Niccolò Belli
Reacted by Levi Lesches
Reacted by berlin4apk, AraHaan, Patrick and Dylan Taylor
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.
Reacted by TPS, AraHaan, Patrick, yimoucao, Niccolò Belli, Rodrigo Faria, Sayaka Halton and Zhengyang Feng
Activity
cirosantilli commentedon Apr 1, 2016
Even more powerful with :-) #200
mirek commentedon Apr 1, 2016
@cirosantilli maybe but the beauty of cherry-pick is that, when can be cleanly applied, it doesn't require any extra UI elements.
larsxschneider commentedon Apr 1, 2016
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...
mirek commentedon Apr 1, 2016
@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.
TPS commentedon Apr 27, 2016
This was removed in 2012: https://github.com/blog/1091-spring-cleaning
🎩/T @klaustopher via #651 (comment)
jimis commentedon Jan 4, 2017
+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.
mirekkukla commentedon Mar 30, 2017
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.
jimis commentedon Sep 27, 2017
Gitlab support cherry-picking in the UI.
@github where are you?
burlen commentedon Oct 11, 2017
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.
MatthiasSchmalz commentedon Mar 21, 2019
3rd anniversary day is coming close. Would be great to have this fixed that day.
HelloKitty commentedon Mar 25, 2019
Ridiculous that we still can't Cherry-Pick.
fbolton commentedon Jul 4, 2019
+1 for cherry-picking. It's a must-have.
shubhamrajvanshi commentedon Jul 18, 2019
47 remaining items
emmaviolet commentedon Jun 22, 2021
@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!
ricka commentedon Jun 22, 2021
@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.
dougbu commentedon Jun 23, 2021
@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
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.
emmaviolet commentedon Jun 23, 2021
@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).
AraHaan commentedon Jun 23, 2021
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?

AraHaan commentedon Jun 23, 2021
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: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)?
ricka commentedon Jun 23, 2021
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:
Gitlab:
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.
PibePlayer commentedon Jun 24, 2021
@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 😅
dylanjt commentedon Jun 29, 2021
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 tomasteroutside release schedule. I can just cherry-pick the patch's commit tostagingand thenmaster(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.emmaviolet commentedon Jul 21, 2021
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 :-)
JonKohler commentedon Jul 21, 2021
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 :(
AraHaan commentedon Jul 21, 2021
I would see (or expect) major use of this feature by @dotnet and @microsoft if it was in public preview.
LukeStephen commentedon Jul 21, 2021
@emmaviolet I loved this feature, and used it daily, was it just removed from my account?
dylanjt commentedon Jul 21, 2021
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.