👈 More articles are this way my dudes 🏄‍♀️

TIL: How to cherry-pick individual files from a commit

May 05, 2020 (1 min read)

A colleague was working on one feature while I worked on another and he made a component that would be handy on my branch.

I didn’t want to just copy/paste all the files he was working on over into my branch so I did a quick google search and realized you can accomplish this with Git.

TIL You can cherry-pick individual files from a commit using:

git cherry-pick -n <commit>

It’s like an interactive rebase but with cherry-pick 🍒

Here’s the stackoverflow post I found it on. If you find this useful go give the author an up vote! https://stackoverflow.com/a/5717615/5056424


Buy Me a Coffee at ko-fi.com...
© 2023, Built with 💖and Gatsby baby 🤙