checkout a file from another branch code example
Example 1: checkout file from another branch
git checkout master -- myplugin.js
Example 2: copy files from another branch git
# git checkout <branch> <path>
$ git checkout other_branch world.txt
git checkout master -- myplugin.js
# git checkout <branch> <path>
$ git checkout other_branch world.txt