Copy files from another branch into the current branch

Back to index
Date: 2021-08-04
Category: git


git checkout otherbranch myfile.txt

General versions:

git checkout <commit_hash> <relative_path_to_file_or_dir>
git checkout <remote_name>/<branch_name> <file_or_dir>

Source