DEV Community

pmgzo
pmgzo

Posted on • Updated on

My last git command that I learned to use

My last command that i learn is git cherry pick <hash of the commit to use>

Basically "cherry pick" help you to add a commit from another branch to your current branch.

Say you coded a piece of code that you need right now in your current branch, you can use git cherry pick.

Just make sure that both branches (one with commit to add and your current branch) have a common root history. However they don't need to have exactly the same history.

Top comments (0)