How can I copy files from a branch to another using git? April 5, 2023 by Tarik You can: git checkout gh-pages git checkout master foo git commit -m 'Add file foo to gh-pages.'