Copy a Version of a Single File or Folder from One Git Branch to Another
To copy a specific file from one Git branch to another, run this command from the branch where you want the file to be placed:
git checkout otherbranch myfile.txt
Source: Stack Overflow
Enjoy Reading This Article?
Here are some more articles you might like to read next: