GitHub Desktop now supports cherry-picking
GitHub Desktop aims to provide an intuitive way for users to complete everyday Git and GitHub workflows. One of our most requested features from the past year is cherry-picking, and…
GitHub Desktop aims to provide an intuitive way for users to complete everyday Git and GitHub workflows. One of our most requested features from the past year is cherry-picking, and we’re excited to release it in GitHub Desktop 2.7.
Cherry-picking is a handy feature for when you would like to copy commits from one branch to another. What more intuitive way to copy a commit than by simply picking it up, dragging it to your branch, and dropping it there!
For example, you start working on a new feature, and several commits into development you identify an existing bug in the underlying architecture. You create a couple of commits to fix that bug. Then, you decide that the fix needs to go into production and can’t wait until this feature is finished. No problem! Just create a release branch and use GitHub Desktop to cherry-pick those commits to your new branch for the hotfix.
Drag and dropping commits
Want to cherry-pick a single commit? Just start dragging it.
What about multiple commits? Shift+click the range you would like to copy, and drag away.
Cherry-picking features
There are several goodies that come with cherry-picking:
- Undo: You cherry-picked a group of commits and immediately realized that you cherry-picked one too many. That’s not a problem. Just click undo in the success banner to remove those commits, and it puts you back on the branch you started from.
- Conflict resolution: Not all cherry-picks are this easy, and conflicts may arise. The same conflict resolution dialog you’re familiar with from merging and rebasing is available for taking care of merge conflicts.
- Context menu: Not a fan of drag and drop? Just right click on a commit or set of commits, and select the cherry-pick option to open a branch dialog to select your target branch.
Commit attribution improvements
Cherry-picking isn’t all that is new since version 2.6. Switching between personal and work repos? GitHub Desktop helps you avoid making misattributed commits. Now, your avatar will display a warning icon, and clicking it provides an easy way for you to update your Git config to match an email associated with your GitHub account.
What else would you like to see in GitHub Desktop?
Our users requested cherry-picking and we listened. It is just one of several features and improvements we have released in response to user feedback. As we continue to make our product a user-friendly approach to Git, we find your input invaluable.
Download GitHub Desktop today, and share your feedback with us in our open source repository.
Tags:
Written by
Related posts
Announcing GitHub Secure Open Source Fund: Help secure the open source ecosystem for everyone
Applications for the new GitHub Secure Open Source Fund are now open! Applications will be reviewed on a rolling basis until they close on January 7 at 11:59 pm PT. Programming and funding will begin in early 2025.
Software is a team sport: Building the future of software development together
Microsoft and GitHub are committed to empowering developers around the world to innovate, collaborate, and create solutions that’ll shape the next generation of technology.
Does GitHub Copilot improve code quality? Here’s what the data says
Findings in our latest study show that the quality of code written with GitHub Copilot is significantly more functional, readable, reliable, maintainable, and concise.