Can GitLens do a selected file checkout - cherry picking selected FILES to another commit?

1.5k Views Asked by At

My project failed to compile, so I unsuccessfully tried a variety of solutions over another 8 commits - including some changes I want to preserve.

So my master has some files from a variety of commits that I want to pull over to my "Last Known Good" branch. (Maybe I'll have to do a line diff tool to merge changes within a few files too.)

Best answers I've found on how to 'merge' selected files to another branch are at:

I'm thinking that GitLens must have a way to right click on a file from a (otherwise evil) commit and perform a 'git checkout --patch CommitName FilePath' to add that commit's version of the file to the current checked out branch where I can test & likely commit it in the future.

I want to semi-automate this in VS Code as I have a lot of files to review/pull over.

I'm fairly new to git and GitLens and uncertain about all the options/terminology. Is this possible?!

0

There are 0 best solutions below