DeveloperBreeze

Git Workflow Development Tutorials, Guides & Insights

Unlock 1+ expert-curated git workflow tutorials, real-world code snippets, and modern dev strategies. From fundamentals to advanced topics, boost your git workflow skills on DeveloperBreeze.

Advanced Git Techniques Cheatsheet: Rebase, Cherry-Pick, and Interactive Staging

Cheatsheet August 20, 2024
bash

# Cherry-pick a single commit
git cherry-pick <commit-hash>

# Cherry-pick multiple commits
git cherry-pick <commit-hash1> <commit-hash2> ...

# Cherry-pick a range of commits
git cherry-pick <commit-hash1>^..<commit-hash2>

# Continue cherry-picking after resolving conflicts
git cherry-pick --continue

# Abort a cherry-pick operation
git cherry-pick --abort
# Switch to the main branch
git checkout main

# Cherry-pick a commit from feature-branch
git cherry-pick <commit-hash>