checkout specific file git code example
Example 1: checkout file from another branch
git checkout master -- myplugin.js
Example 2: git checkout single file
git fetch
git checkout origin/master -- path/to/file
git checkout master -- myplugin.js
git fetch
git checkout origin/master -- path/to/file