Move a file between git branches
July 2021

Checkout the branch where you want the file to by copied to, then:

git checkout <other-branch> <relative-file-path or directory>
  • Use a commit hash to pull files from any commit
  • Multiple files and directories can be specified
  • Overwrites the file

SO

more discussion