Sometimes we may want to copy just one or two files from dev branch without merging the whole branch with master branch.
Below commands will do the same for us.(assuming you are in another branch than dev)
git checkout dev -- path/to/your/file.
git checkout dev -- path/to/your/folder
git checkout <commit_hash> <relative_path_to_file_or_dir>