selfie of Kenton

Kenton Vizdos

i make cool things in go. this is my dev log. note: it's not a technical masterpiece, I just like writing (sometimes poorly) about what I learn!

One File, No Merge

The Problem #

In my project, I have a set of prechecks that run prior to an action taking place. I made some adjustments to a specific precheck within a branch, but I needed to pull that update into main without merging the entire branch.

How to Copy a Single File from Another Branch #

...without merging, like a Pro.

1git restore --source <branch_name> -- <file_path>

That's literally it. I don't know why it took me so long to figure this one out.