I am searching for an easier way to copy specific files and directories from 1 git branch to another without committing them.
Ex:
- 2 branches - devandprod
- File service/web/company.htmlis present in bothdevandprodbranches. I want to copy this file fromdevtoprod, modify it a bit and then commit it toprod.
At the moment what I do is:
- Clone the git repository 2 times into separate directories (git_dev & git_prod) and switch their branches ( - git checkout).
- cp -f git_dev/service/web/company.html git_prod/service/web/company.html
There are files and directories currently committed to the dev branch that I want to copy to the prod branch, modify them and then commit them to the prod branch.
 
     
    