My main reference is this page:
https://www.geeksforgeeks.org/git/how-to-checkout-a-file-from-another-branch-in-git/
But there are plenty of other pages around. This is a summary of how I think about it.
Check where we are up to and what branch we are using.
git status
Check the names of all the branches.
git branch
Check out the target branch, the one we want to be working on
git checkout feature-working-branch
Take the file from the other branch. This is checking out a file, rather than a checking out a branch.
git checkout feature-branch -- path/to/file
And that’s it!