Streamline Your Workflow: Cherry-Picking with Git in VSCode

Why cherry-picking matters for clean code and efficient releases.

March 3, 2025

By Kat Lea

Git Like a Pro: Cherry-Picking in VSCode Explained

In modern software development, efficient code management is crucial for delivering high-quality applications. Git, the most popular version control system, offers powerful tools for managing changes across branches. One such tool is cherry-picking - which lets you selectively apply specific commits from one branch to another. This feature streamlines production workflows by allowing you to transfer critical bug fixes or features to a release branch without including unrelated changes. Using cherry-picking strategically helps maintain cleaner codebases, minimize risks, and ensure only relevant updates reach production - saving time and reducing headaches for your team.

The Git Graph Extension

The Git Graph extension in Visual Studio Code makes cherry-picking easier and more effective. This tool offers a clear visual view of your Git repository's commit history, helping you spot and select commits for cherry-picking. You can see branch structures, commit messages, and file changes clearly in one view. Instead of memorizing complex Git commands, Git Graph simplifies the process and reduces errors. This visual approach to cherry-picking helps you manage code more precisely within VSCode's familiar interface.

How to Install Git Graph

Search and Install the Git Graph extension in the extensions tab in VSCode. Hit Install. Before doing this, you will need to have a repository cloned/set up within VSCode of your choice. You can do this within the Source Control tab.

  • Have a repo cloned and ready to go (example: from Git Hub or DevOps)
  • Install the Git Graph extension

Screenshot of VSCode Showing Git Graph Extension Installation

From here, we can begin to use Git Graph to start cherry-picking commits into a branch!

How to Use Git Graph

To view Git Graph in VSCode, click the Source Control tab. When you hover over the tab, you'll see several action buttons. Click the "View Git Graph (git log)" button to display the visualization.

Screenshot of VSCode Showing Git Graph in the Source Control Tab

The Git Graph displays in git log mode, showing all commits made to a branch within this repository. Your commits will appear in chronological order.

Screenshot of VSCode Showing Git Graph in Git Log Mode

From here, you can perform multiple actions:

  • You can view commits and branches
  • Checkout branches
  • Cherry-pick commits
  • Revert commits
  • Merge commits into your current checked out branch
  • Rebase current branch on this commit
  • Reset current branch to this commit

How to Cherry-Pick Using Git-Graph

Git-Graph makes cherry-picking easy. This technique lets you selectively apply specific commits from one branch to another, allowing you to transfer critical code fixes or features to a release branch without including unrelated changes.

To perform this action, right-click on a specific commit row in Git Graph to see a dropdown menu of options. First, ensure you're in the branch where you want to merge these commits. Then locate and click the "Cherry Pick" tab.

Screenshot of VSCode Git Graph Showing How to Access Cherry-Pick

A dialog box will appear asking to confirm the cherry pick of your selected commit. Check the "No Commit" box and click "Yes, cherry pick." This stages the cherry pick without committing it - giving you a chance to review the changes before committing and pushing to your branch. It also lets you select specific parts of the commit if needed.

Screenshot of Dialog Box Confirming Cherry-Pick

After clicking "Yes, cherry pick," you'll see the commits appear under "Staged Changes" in the Source Control tab. Take the time to review code changes and un-stage any unnecessary modifications. Once everything looks correct, you can commit the changes to the branch.

Screenshot of VSCode Showing Staged Changes After Cherry-Pick

Congrats! You’ve just cherry-picked like a pro!

You can cherry-pick multiple commits at once by following these same steps and right-clicking additional commits in sequence. (This is especially useful when pushing multiple fixes or features to one branch.)

Final Thoughts: Optimizing Your Workflow with Git Cherry-Picking

Git cherry-picking is a powerful technique that lets developers selectively apply changes across branches. This makes it an essential tool for maintaining clean, efficient workflows. When paired with the intuitive Git Graph extension in Visual Studio Code, you can simplify complex processes and focus on shipping quality code.

Git Graph offers a visual, user-friendly way to handle critical fixes, feature integration, and branch management. Its error reduction, precise control, and productivity benefits make it indispensable for developers.

As you master cherry-picking with Git Graph, you'll gain both efficiency and confidence in version control. These skills help you manage repositories better, deploy more smoothly, and truly "Git like a pro."

Kat Lea

Kat Lea

Front-End Developer

Kat is a front-end developer with a diploma in Contemporary Web Design. She has experience working in JavaScript based frameworks and libraries. Outside of work, she enjoys music, gaming with friends, and nature photography.